Skip to content

Commit

Permalink
Wait for child with specific PID to avoid waiting on other zombie pro…
Browse files Browse the repository at this point in the history
…cesses (e.g. NewRelic RPM) which may have forked earlier.
  • Loading branch information
Jacobkg authored and defunkt committed Oct 21, 2011
1 parent 0dc6974 commit 635b50c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resque/worker.rb
Expand Up @@ -135,7 +135,7 @@ def work(interval = 5.0, &block)
if @child = fork
srand # Reseeding
procline "Forked #{@child} at #{Time.now.to_i}"
Process.wait
Process.wait(@child)
else
procline "Processing #{job.queue} since #{Time.now.to_i}"
perform(job, &block)
Expand Down

0 comments on commit 635b50c

Please sign in to comment.