Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkstemp(3C) — DG/UX R4.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpid(2)

open(2)



mkstemp(3C)                       SDK R4.11                      mkstemp(3C)


NAME
       mkstemp - make a unique file name

SYNOPSIS
       mkstemp(template)
       char *template;

DESCRIPTION
       Mkstemp creates a unique file name, typically in a temporary
       filesystem, by replacing template with a unique file name and
       returning a file descriptor for the template file open for reading
       and writing.  The template should contain a file name with six
       trailing X's, which are replaced with the current process id and a
       unique letter.  Mkstemp avoids the race between testing whether the
       file exists and opening it for use.

DIAGNOSTICS
       Mkstemp returns an open file descriptor upon success.  It returns -1
       if no suitable file could be created.

SEE ALSO
       getpid(2), open(2).


Licensed material--property of copyright holder(s)

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