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

C. Abney cabney at ucsd.edu
Thu Jun 3 12:09:26 CDT 2004


That's right... should have looked.  my bad.

Yours,

Charles

On Thu, 2004-06-03 at 09:39, Chris Radcliff wrote:
> 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.
> 
> Cheers,
> ~c
> 
> 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.
> 
-- 
Charles Abney
Polymorphism Research Laboratory, 0603
UCSD School of Medicine
9500 Gilman Dr.
La Jolla, CA 92093-0603
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.pm.org/pipermail/san-diego-pm/attachments/20040603/c8c545c9/attachment.bin


More information about the San-Diego-pm mailing list