[Rd] check does not check that package examples remove tempdir()

danlrobertson89 at gmail.com danlrobertson89 at gmail.com
Thu Nov 9 02:55:42 CET 2017


> tempdir(). I think it happens because the forked process shares the
> value of tempdir() with the parent process and removes it when it
> exits.

This is very likely the case. Pretty much the entire library can be
summed up by bfork_fork, which is the following.

    SEXP res;
    pid_t pid;
    if((pid = fork()) == 0) {
        PROTECT(res = eval(lang1(fn), R_GlobalEnv));
        PROTECT(res = eval(lang2(install("q"), mkString("no")), R_GlobalEnv));
        UNPROTECT(2);
    }

    return ScalarInteger(pid);

I wrote this lib when I was still in school and can see several issues
with the implementation of `bfork_fork`. This issue happens because
we do not exit with _exit, but by essentially calling q("no").

Cheers,

Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20171109/6a98e5e2/attachment.sig>


More information about the R-devel mailing list