Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mktemp(S) — OpenDesktop Software Development System 3.0.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpid(S)

tmpfile(S)

tmpnam(S)


 mktemp(S)                      6 January 1993                      mktemp(S)


 Name

    mktemp - make a unique filename

 Syntax


    cc ... -lc


    char *mktemp (template)
    char *template;


 Description

    The mktemp function 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 ``X''s;
    mktemp replaces the ``X''s with a letter and the current process ID.  The
    letter is chosen so that the resulting name does not duplicate an exist-
    ing file.

 Diagnostics

    The mktemp function assigns to template the null string if it cannot cre-
    ate a unique name.

 See also

    getpid(S), tmpfile(S), tmpnam(S)

 Standards conformance

    mktemp is conformant with:
    AT&T SVID Issue 2, but has been withdrawn from XPG3;
    and Intel386 Binary Compatibility Specification, Edition 2 (iBCSe2).


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