getpid() or something similar

Ketil Z. Malde ketil@ii.uib.no
22 May 2003 14:08:29 +0200


"Simon Marlow" <simonmar@microsoft.com> writes:

>> Is there no other way? I cannot be the first person ever to need a
>> temporary file, can I? Surely there must be some portable way, too?

> Even using a ProcessID doesn't guarnatee uniqueness, it just gives you a
> good chance that your file won't conflict - you still have to cope with

How about wrapping mkstemp (3)?  And perhaps add the wrapper somewhere
in System?  Sounds like useful functionality to me.

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants