Skip to content

[R-pkg-devel] Forward SIGUSR1/2 to package

2 messages · Matthias Gondan, Ivan Krylov

#
Dear list,

I understand that SIGUSR1 and 2 terminate an R session, and I cannot handle them in a package, or can I?

And if I want to disable signal handling, I can do this only by writing my ?own? R that sets R_SignalHandlers = 0 on startup. Is this an accurate description?

Best wishes,

Matthias
#
? Sun, 15 Feb 2026 13:08:32 +0100
Matthias Gondan <matthias-gondan at gmx.de> ?????:
Quite a few packages on CRAN use sigaction() to temporarily set up a
different handler for a signal (SIGINT, SIGALRM, SIGCHLD, sometimes
even SIGSEGV), retain the original handler (presumably set up by R),
then restore it when done.

How are you planning to use the signals?