.\" @(#)mktemp.3 6.2 (Berkeley) %G%
mktemp \- make a unique file name
.B char *mktemp(template)
creates a unique file name, typically in a temporary filesystem,
with a unique file name, and returns the
The template should contain a file name with six trailing
X's, which are replaced with the
current process id and a unique letter.
makes the same replacement to the template
but returns a file descriptor
for the template file open for reading and writing.
avoids the race between testing whether the
file exists and opening it for use.
returns an open file descriptor upon success.
It returns -1 if no suitable file could be created.