srand after the fork.
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@272 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
96ec52d088
commit
ce59fc98b6
@ -141,6 +141,11 @@ while (1) {
|
||||
}
|
||||
die "fork: $!" unless defined $pid; # failure
|
||||
# otherwise child
|
||||
|
||||
## call srand(), else we will have (e.g.) the same tempfile in
|
||||
## _all_ children
|
||||
## i.e. after 'use File::Temp; ($fh,$name)=tempfile();' in a plugin
|
||||
srand( ($$ ^ $port) ^ (time ^ unpack("C*", $iaddr)) );
|
||||
|
||||
close($server);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user