Tapjoy/sensu — pull request #27 by obrie (2013-05-10 15:36:44+00:00)
Title: Fix a variety of issues with check timeouts / forks

This revamps the way we do timeouts for forked processes and how child processes are tied to parent processes. The changes include:

* Fix default check timeouts not being respected
* Fix checks that timeout resulting in zombie processes
* Fix child process not being killed when parent process is killed
* Move timeout code from the sensu client to the check itself using IO.select

Overall what I've basically does is (a) fixed a bug with actually getting the timeout value and (b) changed the forked process to use `IO.select` for both knowing when the check has timed out *and* when the stream between this child and parent process has been killed. When the stream is broken we know we need to quit the process. This basically ensures that when the parent dies, the child dies as well.

This will fix the issues we've been seeing with keepalives as a result of hung forks.

@jjrussell @deanxorr