Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mktemp(3C) — sys5 — Apollo Domain/OS SR10.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpid(2)

tmpfile(3S)

tmpnam(3S)

MKTEMP(3C)                           SysV                           MKTEMP(3C)



NAME
     mktemp - make a unique filename

SYNOPSIS
     char *mktemp (template)
     char *template;

DESCRIPTION
     mktemp 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 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 an existing file.

SEE ALSO
     getpid(2), tmpfile(3S), tmpnam(3S).

DIAGNOSTIC
     mktemp will assign to template the NULL string if it cannot create a
     unique name.

CAVEAT
     If called more than 17,576 time in a single process, this function will
     start recycling previously used names.

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