> +    
> +    ## 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);

What version of perl are you using?  That shouldn't be necessary, and
I can't replicate the problem.

perl -MFile::Temp=tempfile -le' print $]; for(1..4) { unless ( fork()
) { ($h,$n) = tempfile();  print "$_:$n"; exit; } } while(wait>0){1};'
5.008003
1:/tmp/uNb2fHtfHs
2:/tmp/R039hLPiKO
3:/tmp/Wish2wqoM7
4:/tmp/488A0F4Hrx

All children.  All forked.  No srand.  All different.

-R

Reply via email to