Skip to content

Commit 0200c76

Browse files
seamusabsheredefunkt
authored andcommitted
Properly reseed random number generator after forking.
1 parent 24eab54 commit 0200c76

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
@@ -122,7 +122,7 @@ def work(interval = 5.0, &block)
122122
working_on job
123123

124124
if @child = fork
125-
rand # Reseeding
125+
srand # Reseeding
126126
procline "Forked #{@child} at #{Time.now.to_i}"
127127
Process.wait
128128
else

0 commit comments

Comments
 (0)