From: ts Date: 2008-02-10T20:38:26+09:00 Subject: Re: Possibly a timeout related problem >>>>> "D" == Dave Thomas writes: D> Setting up a sleep seems to interfere with signal handlers. Well, it seems that it's the opposite : sending a signal interfere with sleep. This is because the parent process receive SIGCHLD that it interrupt the sleep, no ? vgs% cat b.rb trap("CLD") do pid = Process.wait puts "Child pid #{pid}: terminated" end exec("/bin/sh -c 'echo hello'") if fork.nil? puts "start" sleep 12 puts "done" vgs% emacs -nw b.rb vgs% cat b.rb trap("CLD") do pid = Process.wait puts "Child pid #{pid}: terminated" end exec("/bin/sh -c 'echo hello'") if fork.nil? puts "start" sleep 2 puts "done" vgs% vgs% ./ruby -v b.rb ruby 1.9.0 (2008-02-09 revision 15320) [i686-linux] start hello Child pid 9185: terminated done vgs% Guy Decoux