Sha256: f7dc1a73c03de809a538b53cfc28abef69fc737cfea9c3765df8d8f4817f2e49
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
NAME ---- assassin.rb SYNOPSIS -------- no zombies ever, not even on `exit!` or `kill -9` USAGE ----- ```ruby pipe = IO.popen 'some-program-that-must-not-be-zombied' Assassin.at_exit_kill(pipe.pid) ``` also see lib/assassin.rb and test/assassin_test.rb DESCRIPTION ----------- assassin.rb is a small (~ 60 loc), simple, reliable methodology of ensuring that child processes are *always* cleaned up, regardless of the manner in which the parent program is shut down. the basic concept it to generate, start, and detach another script that monitors the parent process and, when that process no longer exists, ensures through escalation of signals that a child process is shut down and does not become a zombie. this becomes espcially important for libraries which spawn processes, such as via `IO.popen` that need to ensure those children are cleaned up, but which cannot control whether client code may call `exit!`. this approach also handles being `kill -9`d - something no `at_exit{}` handler can promise. INSTALL ------- gem install assassin URI --- http://github.com/ahoward/assassin HISTORY ------- - 0.4.2. initial release
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
assassin-1.4.2 | README.md |