From: Joel VanderWerf Date: 2008-10-08T00:37:27+09:00 Subject: Re: Ruby lacks atfork : The evil that lives in fork... John Carter wrote: > Can I chain the at fork handlers? Chaining is possible. You can have multiple copies of the following code (changing the Mutex-specific part of course): class Mutex module ForkSafely def fork super do ObjectSpace.each_object(Mutex) { |m| m.remove_dead } yield end end end end module ForkSafely include Mutex::ForkSafely end include ForkSafely -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407