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
- OS: Linux
- NodeJS: v12.2.0
tmp@0.1.0
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
tmp@0.1.0