Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpid(2)

tmpfile(3S)

tmpnam(3S)

MKTEMP(3C)  —  Kubota Pacfic Computer Inc. (C Programming Language Utilities)

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 replaces the Xs with a letter and the current process ID.  The letter is chosen so that the resulting name does not duplicate an existing file. 

SEE ALSO

getpid(2), tmpfile(3S), tmpnam(3S)

DIAGNOSTIC

mktemp assigns to template the NULL string if it cannot create a unique name. 

CAVEAT

If called more than 17,576 times in a single process, this function starts recycling previously used names. 

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026