Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Poor randomness with File::Temp and fork().

by Joost (Canon)
on Jun 27, 2004 at 16:58 UTC ( [id://369998]=note: print w/replies, xml ) Need Help??


in reply to Poor randomness with File::Temp and fork().

Well, as a workaround i'd say something like this should work:
my tmp = new File::Temp( TEMPLATE => "temp".$$."XXXXX", DIR => '/tmp', SUFFIX => '.dat');
At least you won't have to modify File::Temp.

Though I would expect File::Temp to do something similar for me, I'm not sure that it actually guarantees a unique filename for forked() siblings. Maybe you should file a bug report. (don't forget a working example demonstrating the bug)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://369998]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-03-28 15:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found