Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Generate a unique ID

by moritz (Cardinal)
on Nov 15, 2010 at 09:26 UTC ( #871423=note: print w/ replies, xml ) Need Help??


in reply to Generate a unique ID

I'm thinking to combine: process id with current date-time to the highest resoltion available.

That was my first idea too. Then I remembered that the Linux kernel has experimental support for PID namespaces, which means that it's possible to have arbitrary PIDs per user, and the same PID in two programs that are run by different users at the same time.

If you don't care about such exotic cases, you should be fine.


Comment on Re: Generate a unique ID

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-08-23 02:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (171 votes), past polls