getpid() or something similar
David Roundy
droundy@abridgegame.org
Thu, 22 May 2003 06:23:14 -0400
On Thu, May 22, 2003 at 12:05:46PM +0200, Peter Simons wrote:
> Simon Marlow writes:
>
> > Even using a ProcessID doesn't guarnatee uniqueness [...]
>
> Why not? If I use the file only temporarily (it is gone once the
> process terminates), something like /tmp/foo.<pid> will be unique, for
> all I can tell.
A Bad Person using another program may have created a file named
/tmp/foo.<pid> to annoy you (or crash your program)...
--
David Roundy
http://www.abridgegame.org