tempnam/mktemp

Tim Smith tim at cithep.UucP
Sun Aug 25 15:02:55 AEST 1985


> If tempnam/mktemp does anything more than sprintf(fname, "/tmp/tmp%d%d",
> getpid(), cnt++), what it does escapes me. Perhaps someone out there could
> tell me how 2 processes can have the same pid? I deem to be missing something.

Well, in the above, a proc with pid 10 creating 11 temp files will collide with
a proc with pid 101 creating 1 temp file.  Perhaps "/tmp/tmp%d.%d" would be
better. 
-- 
unlk	a6
rts
					Tim Smith
				ihnp4!{wlbr!callan,cithep}!tim



More information about the Comp.unix.wizards mailing list