Skip to content

setGracefulCleanup() doesn't ALWAYS clean up file. #199

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

Closed
brillout opened this issue Oct 2, 2019 · 4 comments
Closed

setGracefulCleanup() doesn't ALWAYS clean up file. #199

brillout opened this issue Oct 2, 2019 · 4 comments

Comments

@brillout
Copy link

brillout commented Oct 2, 2019

Expected Behavior

When using setGracefulCleanup() the file should not exist anymore after the process is terminated.

Experienced Behavior

setGracefulCleanup() works when the process receives a SIGINT but doesn't when the signal is SIGTERM or SIGKILL.

Same if the the machine were to unexpectedly crash, e.g. the machine's power is shut down.

On linux, the trick would be to create a file and to delete it right away while still having the file open. (As mentioned here.)

Env

@silkentrance
Copy link
Collaborator

@brillout It seems as if 12.2.0 introduced even more changes under the hood.

@silkentrance
Copy link
Collaborator

silkentrance commented Oct 5, 2019

@brillout This seems to be what we are experiencing in #198.
I already made a fix for that in https://github.com/raszi/node-tmp/tree/matsev-update-dependencies-to-latest-versions.
But I still need to figure out on how to push these changes to the original branch in order to get the PR #198 working.

@silkentrance
Copy link
Collaborator

Fixed with #198.

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

2 participants