R
Ralph Shnelvar
[Note: parts of this message were removed to make it a legal post.]
I am trying to implement the code on page 181 of *Programming Ruby 1.9*
The code on that page reads
- - -
trap("CLD") do
pid = Process.wait
puts "Child pid #{pid}: terminated
end
fork { exec("sort testfile >output.txt") }
- - -
When I attempt to run similar code I first get that
unsupported signal SIGCLD
I tried SIGCHLD ... same problem.
Signals.list generates
{"SEGV"=>11, "KILL"=>9, "TERM"=>15, "INT"=>2, "FPE"=>8, "ABRT"=>22, "ILL"=>4, "EXIT"=>0}
So I next tried
- - -
trap("EXIT") do
pid = Process.wait
puts "Child pid #{pid}: terminated
end
fork { exec("sort testfile >output.txt") }
- - -
and that's when I get the msg
fork() function is unimplemented on this machine
Is fork truly not implemented for 1.8.6 and Windows?
How can I execute (spawn) an external program in 1.8.6 and know when the program is finished?
here are the various signals for ruby documented?
I am trying to implement the code on page 181 of *Programming Ruby 1.9*
The code on that page reads
- - -
trap("CLD") do
pid = Process.wait
puts "Child pid #{pid}: terminated
end
fork { exec("sort testfile >output.txt") }
- - -
When I attempt to run similar code I first get that
unsupported signal SIGCLD
I tried SIGCHLD ... same problem.
Signals.list generates
{"SEGV"=>11, "KILL"=>9, "TERM"=>15, "INT"=>2, "FPE"=>8, "ABRT"=>22, "ILL"=>4, "EXIT"=>0}
So I next tried
- - -
trap("EXIT") do
pid = Process.wait
puts "Child pid #{pid}: terminated
end
fork { exec("sort testfile >output.txt") }
- - -
and that's when I get the msg
fork() function is unimplemented on this machine
Is fork truly not implemented for 1.8.6 and Windows?
How can I execute (spawn) an external program in 1.8.6 and know when the program is finished?
here are the various signals for ruby documented?