temporary file names

Keith Bostic keith at seismo.UUCP
Tue Sep 18 08:08:51 AEST 1984


Just got back from a news vacation -- found a long ago article suggesting
that people use mktemp(3) to produce unique file names -- and a small
program that allowed it to be called from the shell.

This is a dangerous fix on EUNICE machines.  The EUNICE shell does not
increment process id's as expected under UNIX.  Just as an example:

#include <stdio.h>

main()
{
	static char	buf[] = "fileXXXXXX";
	char	*mktemp();

	printf("file name: %s\n",mktemp(buf));
}

when run twice in a row will produce the same file name.

		Keith 
			ARPA: keith at seismo 
			UUCP: seismo!keith



More information about the Comp.os.eunice mailing list