X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FFastCGI.pm;h=85dee5261a2c20aa83371a729acf0e6f4701f59d;hb=269194b4f9de3905430a2d1f21f68da13b2b9ed9;hp=4af5470c396ae6b740fbebef855803ee98296853;hpb=c46dd4e827ae611b4e5047d236507a4470bf43a5;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine/FastCGI.pm b/lib/Catalyst/Engine/FastCGI.pm index 4af5470..85dee52 100644 --- a/lib/Catalyst/Engine/FastCGI.pm +++ b/lib/Catalyst/Engine/FastCGI.pm @@ -102,7 +102,7 @@ sub run { my $error = \*STDERR; # send STDERR to the web server $error = \*STDOUT # send STDERR to stdout (a logfile) if $options->{keep_stderr}; # (if asked to) - + my $request = FCGI::Request( \*STDIN, \*STDOUT, $error, \%env, $sock, ( $options->{nointr} ? 0 : &FCGI::FAIL_ACCEPT_ON_INTR ), @@ -130,6 +130,9 @@ sub run { $self->daemon_detach() if $options->{detach}; $proc_manager->pm_manage(); + + # Give each child its own RNG state. + srand; } elsif ( $options->{detach} ) { $self->daemon_detach(); @@ -138,11 +141,11 @@ sub run { while ( $request->Accept >= 0 ) { $proc_manager && $proc_manager->pm_pre_dispatch(); - + $self->_fix_env( \%env ); - + $class->handle_request( env => \%env ); - + $proc_manager && $proc_manager->pm_post_dispatch(); } }