Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If any process calls R_CleanTempDir it is removed for all sessions #194

Open
s-u opened this issue Jun 8, 2023 · 0 comments
Open

If any process calls R_CleanTempDir it is removed for all sessions #194

s-u opened this issue Jun 8, 2023 · 0 comments

Comments

@s-u
Copy link
Owner

s-u commented Jun 8, 2023

If R_CleanTempDir() is called in any of the worker processes, it will remove R's temporary directory for all sessions using the same temporary directory. By default, all R sessions will share the same temporary directory which can cause removal of tempdir() for existing sessions.

One way to force independent temporary directories is to remove tempdir() before forking and call tempdir(TRUE) after forking which creates a new temporary directory.

Note that R_CleanTempDir is called as part fo the cleanup of any R process, so this can happen in any cases where R initiates a shutdown including SIGPIPE handler or explicit user exit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant