MKTEMP(3C) UNIX Programmer's Manual MKTEMP(3C) NAME mktemp - make a unique file name SYNOPSIS char *mktemp (template) char *template; HP-UX COMPATIBILITY Level: HP-UX/RUN ONLY Origin: System III DESCRIPTION _M_k_t_e_m_p replaces _t_e_m_p_l_a_t_e by a unique file name, and returns the address of the template. The template should look like a file or path name with six trailing Xs, which will be replaced 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 _M_k_t_e_m_p returns its argument except when it runs out of letters, in which case the result is a pointer to the string "/". SEE ALSO getpid(2). BUGS It is possible to run out of letters. _M_k_t_e_m_p does not check to see if the file name part of _t_e_m_- _p_l_a_t_e exceeds the system limit of 14 characters.