MKTEMP(3C) — HP-UX
NAME
mktemp − make a unique file name
SYNOPSIS
char ∗mktemp (template)
char ∗template;
DESCRIPTION
Mktemp replaces the contents of the string pointed to by template by a unique file name, and returns the address of template. The string in template should look like a file name with six trailing Xs; mktemp will replace the Xs with a letter and the current process ID. The letter will be chosen so that the resulting name does not duplicate the name of an existing file. If there are less than 6 Xs, the letter will be dropped first, and then high order digits of the process ID will be dropped.
RETURN VALUE
Mktemp returns its argument except when it runs out of letters, in which case the result is a pointer to the empty string "".
SEE ALSO
SEE ALSO
getpid(2), tmpfile(3S), tmpnam(3S).
BUGS
It is possible to run out of letters.
Mktemp does not check to see if the file name part of template exceeds the maximum length of a file name.
Hewlett-Packard Company — Version B.1, April 12, 1993