List Info

Thread: (Open) Signal handling and sleep() don't work together




(Open) Signal handling and sleep() don't work together
country flaguser name
Japan
2008-06-15 23:18:04
Issue #166 has been reported by Dave Thomas.

----------------------------------------
Bug #166: Signal handling and sleep() don't work together
http://r
edmine.ruby-lang.org/issues/show/166

Author: Dave Thomas
Status: Open
Priority: Normal
Assigned to: 
Category: 
Target version: 


Setting up a sleep seems to interfere with signal handlers.
The following code

 trap("CLD") do
    pid = Process.wait
    puts "Child pid #: terminated"
 end

 exec("/bin/sh -c 'echo hello'") if fork.nil?
 puts "start"
 sleep 2
 puts "done"

Outputs start/hello/done with no delay, and the trap never
fires. Replace the sleep with a gets, and the signal handler
gets invoked—it never writes “Child xxx terminated.”


----------------------------------------
You have received this notification because you have either
subscribed to it, or are involved in it.
To change your notification preferences, please click here:
http://redmin
e.ruby-lang.org/my/account


(Closed) Signal handling and sleep() don't work together
country flaguser name
Japan
2008-07-09 06:33:09
Issue #166 has been updated by Nobuyoshi Nakada.

Status changed from Open to Closed
% Done changed from 0 to 100

Applied in changeset r17973.
----------------------------------------
http://r
edmine.ruby-lang.org/issues/show/166

----------------------------------------
You have received this notification because you have either
subscribed to it, or are involved in it.
To change your notification preferences, please click here:
http://redmin
e.ruby-lang.org/my/account


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )