[Rd] tempdir() may be deleted during long-running R session

Dirk Eddelbuettel edd at debian.org
Wed Apr 26 15:40:38 CEST 2017


On 26 April 2017 at 08:29, Duncan Murdoch wrote:
| This seems like the wrong approach.  The problem occurs as soon as the 
| tempdir() gets cleaned up:  there could be information in temp files 
| that gets lost at that point.  So the solution should be to prevent the 
| cleanup, not to continue on after it has occurred (as "check = TRUE" 
| does).  This follows the principle that it's better for the process to 
| always die than to sometimes silently produce incorrect results.

That is generally true, but also "hard" as we don't have a handle on the OS.

| Frederick posted the way to do this in systems using systemd.  We should

While that was a very helpful post yet it may only apply to Arch Linux as
stated.  My Ubuntu systems at home and work all run systemd too, but do _not_
automatically remove tempfiles. 

Yet what he suggested is quite right: we should define a proper config file
for this facility and then possibly also use the /run directory as many other
services now and (of course) also either TEMPDIR or later the code to have
/run be another fallback if TMP, TEMP, TMPDIR, ... are unset.

Distribution maintainers such as yours truly could then include this
configuration.

| be putting that in place, or the equivalent on systems using other 
| tempfile cleanups.  This looks to me like something that "make install" 
| should do, or perhaps it should be done by people putting together 
| packages for specific systems.

Doesn't 'make install' only write to $RHOME/ and below, plus $PREFIX/bin ?

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-devel mailing list