mktemp(S)
mktemp --
make a unique filename
Syntax
cc ... -lc
#include <stdlib.h>
char *mktemp (template)
char *template;
Description
The
mktemp
function
replaces the contents of the string pointed to by
template
by a unique filename, and returns the
address of
template.
The string in
template
should look like a filename with six trailing
``X''s;
mktemp
replaces the
``X''s
with a
letter and the current process ID.
The letter is chosen so that the resulting
name does not duplicate an existing file.
Diagnostics
The
mktemp
function
assigns to template the null string if it
cannot create a unique name.
See also
getpid(S),
mkstemp(S),
tmpfile(S),
tmpnam(S)
Standards conformance
mktemp is conformant with:
Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2)
.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003