NUBIC/ncs_navigator_core — pull request #192 by yipdw (2013-05-28 16:59:36+00:00)
Title: Fix interaction of field log writer with worker forking

`fork(2)` copies only a single thread from its parent process, which is the thread that called `fork(2)`. All other parent threads do not exist in the child.

Ruby 1.9.x maps Ruby threads to system threads, so we need to account for this. (Previously, we weren't accounting for this, which meant that the field log writer wasn't responding to messages at all.)

The accounting method is pretty simple: if we're in a known workers-will-fork situation, then we start the field log writer supervisor (and, by extension, the writer) for each worker process (not the master). If we're not in a situation like that, we assume starting the writer supervisor at startup is the right thing to do. AFAICT, this covers all NUBIC use cases.