table of contents
other versions
TMPFILE(3) | Linux Programmer's Manual | TMPFILE(3) |
NAME¶
tmpfile - create a temporary file
SYNOPSIS¶
#include <stdio.h> FILE *tmpfile (void);
DESCRIPTION¶
The tmpfile() function generates a unique temporary filename using the path prefix P_tmpdir defined in <stdio.h>. The temporary file is then opened in binary read/write (w+b) mode. The file will be automatically deleted when it is closed or the program terminates.
RETURN VALUE¶
The tmpfile() function returns a stream descriptor, or NULL if a unique filename cannot be generated or the unique file cannot be opened.
ERRORS¶
CONFORMING TO¶
SVID 3, POSIX, BSD 4.3, ISO 9899, SUSv2
SEE ALSO¶
April 3, 1993 | GNU |