From: Eric Hodel Date: 2006-02-28T08:27:04+09:00 Subject: Re: DRb and signals On Feb 27, 2006, at 2:45 PM, mental@rydia.net wrote: > Using DRb appears to disable signal handlers in Ruby, at least in > 1.8.4. Is there any way to work around this? > > Compare: > > trap( "SIGINT" ) { puts "foo" ; exit 0 } > loop do sleep 1 end > > with: > > require 'drb' > DRb.start_service > trap( "SIGINT" ) { puts "foo" ; exit 0 } > loop do sleep 1 end > > In the second case, sending the process a SIGINT appears to have no > effect at all... Not seeing it: $ ruby -v - ruby 1.8.4 (2005-12-24) [powerpc-darwin8.4.0] require 'drb' DRb.start_service trap( "SIGINT" ) { puts "foo" ; exit 0 } loop do sleep 1 end ^Cfoo $ There's a ^D in there under the ^C, but it got eaten. -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com