[San-diego-pm] another bug in perl: rand/OSX?

Chris Radcliff chris_radcliff at mac.com
Thu Jun 3 11:39:24 CDT 2004

Is it possible that Randal's example is different from the one Charles 
presented? For instance, Charles doesn't call rand() before forking, so 
delaying srand() until the rand() call in 5.8.4 would mean each child 
called srand() separately.

Just a thought, based solely on the thread. I don't know a fork() from 
a spoon() otherwise.


On Jun 3, 2004, at 7:52 AM, C. Abney wrote:

> It's platform specific, however... I get completely different behavior
> on Sun/sparc or Linux/P4.

>> You can illustrate this well known bug with:
>> perl -le 'print rand; fork or exit print rand; fork or exit print 
>> rand; fork or exit print rand; print rand'
>> The behavior has nothing to do with OSX.  It's completely generic to 
>> Perl.
>> I just verified that on my OpenBSD box.

More information about the San-Diego-pm mailing list