[Rd] Suggestion: "kill -USR1 pid" should respect --no-save option

From: Stig B. Mortensen <sbm_at_enfor.dk>
Date: Wed, 23 Mar 2011 09:37:17 +0100 (CET)

If R is killed with "kill -USR1 pid" it will terminate and save its workspace overwriting any exiting .RData-file even if R has been started with the --no-save option. Preferably R should always respect the --no-save option and this should thus be used to determine if the workspace is saved when receiving the USR1 signal.

The following change will adopt this behavior (based on R-2.12.2 source).

$RHOME/src/main/errors.c, line 147

- R_CleanUp(SA_SAVE, 2, 1); /* quit, save, .Last, status=2 */ + R_CleanUp(SA_DEFAULT, 2, 1); /* quit, save, .Last, status=2 */

$RHOME/src/main/errors.c, line 197

- R_CleanUp(SA_NOSAVE, 0, 0);
+ R_CleanUp(SA_DEFAULT, 0, 0);

The documentation in $RHOME/src/library/base/man/unix/Signals.Rd should also be updated accordingly.

To my knowledge it is not possible to send a USR1/USR2 signal on windows so this issue is only relevant on POSIX compliant systems.

Best regards,
Stig B. Mortensen

R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Wed 23 Mar 2011 - 11:39:04 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 Mar 2011 - 12:10:35 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive