janitor 0.1.0

perform cleanup after a program exits
janitor-0.1.0 is not a library.

perform cleanup after its parent process has exited

existing in a seperate process allows it to always perform cleanup, regardless of how the invoking process exited. this includes things that are not usually handlable, like SIGKILL.

to know what cleanup to perform, janitor reads from standard input. each line is a directive, with the first byte identifying its type:

  • d: delete a directory (and its contents)
  • f: delete a file (doesn't follow symlinks)
  • #: ignored