You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 10, 2019. It is now read-only.
If the SIGINT trap here happens to start between these two lines, the workers array possibly contains process IDs belonging to already stopped processes. This results in an Errno::ESRCH exception.
So we're right here: dead_guys = Process.waitall
and then the main process receives an INT signal, delegating that to the child processes: Signal.trap("INT") { workers.each { |w| Process.kill("INT", w) } }
but the dead PIDs are removed after the very first line: dead_guys.each { |pid, status| workers.delete(pid); puts pid.to_s + " exited" }