Skip to content
Prev 24653 / 63421 Next

save() and interrupts

Hi,

thanks for this.
On 4/15/07, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
I'll put it on my todo list to investigate how to make save() more
robust against interrupts before calling the internal code.  One
option is to use tryCatch().  However, that does not handle too
frequent user interrupts, e.g. if an interrupt is sent while in the
"interrupt" call, that will interrupt the function.  So, tryCatch()
alone will only lower the risk for incomplete empty files.  For data
written to files, one alternative is to check for files of zero size
in the on.exit() statement and remove such.

/Henrik