From: "Miroslav S." Date: 2013-04-14T23:38:42+09:00 Subject: Sending signal to win process Hello, I've been googling last 2 days and still can't solve simple problem - send signal to windows process (to be more specific - to another RUBY script running as a new process). I can kill it (Process.kill 9, pid) but I need to trap signal to save work progress so signal 9 (kill) can't be used. But other signals are ignored (?). Here some quick test case: test.rb= run = 1 trap(9) { run = -9 } trap(4) { run = -4 } trap(2) { run = -2 } trap(15) { run = -15 } loop do print "#{Time.now.to_i}\r" sleep 1 break if run < 0 end puts "Result: #{run}" test2.rb= pid = spawn("ruby test.rb") sleep 1 Process.kill 2, pid Available signals: "EXIT"=>0, "INT"=>2, "ILL"=>4, "ABRT"=>22, "FPE"=>8, "KILL"=>9, "SEGV"=>11, "TERM"=>15 Signals test (calling kill in loop) for win32/process: 1 + 4-15: Invalid Memory object 0,2,3 - no error, but no 'trap' occurs 9 - kill process Same loop for generic Process: 1 + 3-15: Invalid argument 0,2 - no error, but again - no 'trap' 9 - kill process Pressing CTRL+C is successfully trapped (result = -2) So, I'll ask again: Is it possible to 'send' signals to another process? -- Posted via http://www.ruby-forum.com/.