Skip to content

Commit 635b50c

Browse files
Jacobkgdefunkt
authored andcommitted
Wait for child with specific PID to avoid waiting on other zombie processes (e.g. NewRelic RPM) which may have forked earlier.
1 parent 0dc6974 commit 635b50c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resque/worker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def work(interval = 5.0, &block)
135135
if @child = fork
136136
srand # Reseeding
137137
procline "Forked #{@child} at #{Time.now.to_i}"
138-
Process.wait
138+
Process.wait(@child)
139139
else
140140
procline "Processing #{job.queue} since #{Time.now.to_i}"
141141
perform(job, &block)

0 commit comments

Comments
 (0)