From: Ralph Shnelvar Date: 2010-09-04T01:07:14+09:00 Subject: Getting notification that a subprocess is killed on Windows ------------10012E1603F784D8D Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit What is the proper way, under Windows, to detect that a process was killed? Crashed? Signal.list.each_key do |key| puts key Signal.trap(key, lambda {|signo| puts "#{key}: pid #{$$} with signo #{signo}"}) end @the_command_pipe = IO.popen(the_command) @the_command_pid = @the_command_pipe.pid Process.waitpid(@the_command_pid) @child_process_return_status = $? . . . Process.kill(:KILL, @the_command_pid) # Seems to properly kill my process All that is TRAP'd is EXIT. Worse, @child_process_return_status.exitstatus is zero. ------------10012E1603F784D8D--