Skip to content
Prev 24652 / 63421 Next

save() and interrupts

On Sun, 15 Apr 2007, Henrik Bengtsson wrote:

            
My understanding is that you cannot user interrupt compiled code unless it 
is set up to check interrupts.  Version 2 saves are done via the internal 
saveToConn, and I don't see any calls to R_CheckUserInterrupt there. So 
you only need to worry about user interrupts in the R code, and that has 
an on.exit action to close the connection (which should be executed even 
if you interrupt).  Which suggests that the file will be

non-existent
empty
complete

and the first two depend on interrupting in the millisecond or less before 
the compiled code gets called.

For other forms of interrupts, e.g. a Unix kill -9, the file state could 
be anything.