Skip to content

Commit

Permalink
Properly reseed random number generator after forking.
Browse files Browse the repository at this point in the history
  • Loading branch information
seamusabshere authored and defunkt committed May 16, 2011
1 parent 24eab54 commit 0200c76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/resque/worker.rb
Expand Up @@ -122,7 +122,7 @@ def work(interval = 5.0, &block)
working_on job

if @child = fork
rand # Reseeding
srand # Reseeding
procline "Forked #{@child} at #{Time.now.to_i}"
Process.wait
else
Expand Down

0 comments on commit 0200c76

Please sign in to comment.