From: ts Date: 2008-04-15T22:37:38+09:00 Subject: Re: at_exit handlers and Process.kill Daniel Berger wrote: > # process_test.rb > File.open("pid.txt", "w"){ |fh| fh.print Process.pid } > p Process.pid > > sleep 1 while true you really think that the following line will be executed ? > > at_exit { > puts "AT_EXIT" > } > > END{ > puts "END" > } > > trap("KILL"){ > puts "KILLED" > } > > # kill_test.rb > pid = IO.read("pid.txt").to_i > p pid > Process.kill(5, pid) This is SIGTRAP Guy Decoux