Skip to content

signal handling

5 messages · Omar Lakkis, Duncan Murdoch, Paul Gilbert +1 more

#
Is ther a signal handling model in R? similar to Perl's %SIG hash.
I want to do fast clean up in my R code before exit when a kill signal
is issued.
#
On Thu, 11 Aug 2005, Omar Lakkis wrote:

            
You may find on.exit() somewhat useful for cleanup
but signals are not propogated to your code by the
R environment.

?Signals (on Unix-based platforms) mentions that SIGUSR2
will bypass the above; no idea about Windows.

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)
#
Omar Lakkis wrote:
I don't know Perl's %SIG hash.  However, there are several things you 
can do:  the on.exit() function lets a function do cleanup, and there 
are various hooks available (see ?setHook), and finalizers (see 
?reg.finalizer) for some kinds of objects.

Duncan Murdoch
#
I'm not sure about perl's signals, but Unix signals can be passed with
     q("yes/no", status=whatever)
See ?q.  This is pretty useful for passing signal to make, for example.

Paul
Omar Lakkis wrote:

            
#
On Fri, 12 Aug 2005, Paul Gilbert wrote:

            
That's a return code though, not a signal.

----------------------------------------------------------
SIGSIG -- signature too long (core dumped)