[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    tmpfile(3S) manual page Table of Contents

Name

tmpfile - create a temporary file

Synopsis

#include <stdio.h>

FILE *tmpfile(void);

MT-Level

Safe

Description

tmpfile() creates a temporary file using a name generated by the tmpnam() routine and returns a corresponding FILE pointer. If the file cannot be opened, a NULL pointer is returned. The file is automatically deleted when the process using it terminates or when the file is closed. The file is opened for update (‘‘w+’’).

See Also

creat(2) , open(2) , unlink(2) , fopen(3S) , mktemp(3C) , perror(3C) , stdio(3S) , tmpnam(3S)


Table of Contents