TMPFILE(3s,L) AIX Technical Reference TMPFILE(3s,L)
-------------------------------------------------------------------------------
tmpfile
PURPOSE
Creates a temporary file.
LIBRARY
Standard I/O Library (libc.a)
SYNTAX
#include <stdio.h>
FILE *tmpfile ( )
DESCRIPTION
The tmpfile subroutine creates a temporary file and returns its FILE pointer.
The file is opened for update.
The temporary file is automatically deleted when the process using it
terminates.
If the file cannot be opened, tmpfile writes an error message to the standard
error output and returns a NULL pointer.
ERROR CONDITIONS
The tmpfile subroutine may fail if the following are true:
EACCES Search permission is denied on a component of the path prefix of the
file to be created, or write permission is denied for the parent
directory of the file to be created.
EINTR A signal was caught during the tmpfile subroutine.
ENOMEM Insufficient storage space is available.
ENOTDIR A component of the path prefix of the file to be created is not a
directory.
EROFS The file to be created would reside on a read-only file system.
RELATED INFORMATION
In this book: "fopen, freopen, fdopen," "mktemp," "open, openx, creat,"
"stdio," "tmpnam, tempnam," and "unlink, rmslink, remove."
Processed November 7, 1990 TMPFILE(3s,L) 1