[R-pkg-devel] Forward SIGUSR1/2 to package (cont'd)
Interesting! Can you point me to one of these packages, so that I see how
they solved the problem? Much appreciated.
The package ("rswipl") is a bridge to SWI-Prolog, and that uses signals for
communication (e.g., between threads). Whenever SIGUSR2 is sent, R stops. I
don't really need this for my own purposes, but the signals are part of the
unit tests of SWI-Prolog, and I wanted to invoke these unit tests on R CMD
check.
? Sun, 15 Feb 2026 13:08:32 +0100
Matthias Gondan <https://stat.ethz.ch/mailman/listinfo/r-package-devel>
?????:
I understand that SIGUSR1 and 2 terminate an R session, and I cannot handle them in a package, or can I?
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?
Best regards, Ivan