[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    mktemp(3C) manual page Table of Contents

Name

mktemp - make a unique file name

Synopsis

#include <stdlib.h>

char *mktemp(char *template);

MT-Level

Safe

Description

mktemp() replaces the contents of the string pointed to by template with a unique file name, and returns template. The string in template should look like a file name with six trailing Xs; mktemp() will replace the Xs with a character string that can be used to create a unique file name.

Return Values

mktemp() will assign to template the empty string if it cannot create a unique name.

See Also

tmpfile(3S) , tmpnam(3S)

Notes

mktemp() can create only 26 unique file names per thread for each unique template.


Table of Contents