The Self-Pipe Trick Explained
This post explains the only safe way to handle Unix signals in the face of waiting on file descriptors (eg. sockets, pipes). This technique is used by awesome server software like Unicorn, Passenger, Foreman, and non-Ruby projects like nginx. Give it a read on RubySource.
Post a comment