Skip to content

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

Closed
@brillout

Description

@brillout

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions