Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkstemp(3c) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

getpid(2)

open(2)



     mkstemp(3c)                DG/UX 4.30                 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.

     SEE ALSO
          getpid(2), open(2)

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
































     Licensed material--property of copyright holder(s)         Page 1



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