avoid potential Logger deadlock in SIGQUIT and SIGUSR1
commit71b4507755f2bd279adb14e6cdc90e1380efa247
authorEric Wong <normalperson@yhbt.net>
Tue, 30 Aug 2011 23:18:21 +0000 (30 16:18 -0700)
committerEric Wong <normalperson@yhbt.net>
Tue, 30 Aug 2011 23:23:21 +0000 (30 23:23 +0000)
treee9ffa38b77c4bcec3619f078d67ea07a01ccc659
parent58a09dccfa425811fa3b66e097c38bb303c2aa1e
avoid potential Logger deadlock in SIGQUIT and SIGUSR1

If any combination of SIGQUIT and SIGUSR1 are sent to a
Rainbows! worker in a /very/ short period of time, the Mutex
used by the default Logger implementation may deadlock since
Mutex synchronization is not reentrant-safe.

Users of alternative logger implementations (or monkey-patched
ones) are possibly not affected.  Users of the logger_mp_safe.rb
monkey-patch distributed[1] with unicorn are not affected.

[1] http://unicorn.bogomips.org/examples/logger_mp_safe.rb
lib/rainbows/base.rb