[Rd] Ignore user interrupts

Sharpie chuck at sharpsteen.net
Mon Jan 23 17:46:54 CET 2012

Is there a way to suspend user interrupts for the duration of a function
call? There is a point in one of my packages where values are being written
to a Filehash database. If the user is unlucky enough to send an interrupt
while this code is active, then they have to:

  - Hunt down a lock file and dispose of it before the package will work

  - Possibly trash the Filehash database and start over if the interrupt
caused R to leave the database file in a corrupted state.

Is there something analogous to the C macros
level to delay interrupts until after critical code has executed?

If not, would it work to move the function call into a C function that uses
`eval` inside a block protected by BEGIN_SUSPEND_INTERRUPTS?


Charlie Sharpsteen
Undergraduate-- Environmental Resources Engineering
Humboldt State University
View this message in context: http://r.789695.n4.nabble.com/Ignore-user-interrupts-tp4321252p4321252.html
Sent from the R devel mailing list archive at Nabble.com.

More information about the R-devel mailing list