search for: old_sighandl

Displaying 1 result from an estimated 1 matches for "old_sighandl".

Did you mean: old_sighandler
2007 Mar 01
0
No subject
...nline; filename="test.rb" class ChildExit < Exception def initialize(command, status) @status = status @command = command end attr_reader :command, :status end def from_child(command) output = "" IO.popen(command) do |x| begin puts :BEGIN old_sighandler = trap(:SIGCHLD) { raise ChildExit.new(command, $?) } loop do output << x.read(1) puts [:readloop, output].inspect end rescue ChildExit => e puts :RESCUE trap(:SIGCHLD, old_sighandler) puts [:select, IO.select([x], [], [], 0)].inspect while IO.select([x]...