TMPFILE

Section: MINTLIB LIBRARY FUNCTIONS (3)
Updated: 3 March 1993
Index Return to Main Contents
 

NAME

tmpfile - create a temporary file  

SYNOPSIS

#include <stdio.h>

FILE *tmpfile(void);
 

DESCRIPTION

tmpfile creates a temporary file using a name generated by tmpnam, and returns a corresponding FILE pointer. If the file cannot be opened, a NULL pointer is returned. The file will automatically be deleted when the process using it terminates. The file is opened in binary mode for update ("w+b").  

SEE ALSO

fopen(3), mktemp(3), tmpnam(3), unlink(3)  

NOTE

When MiNT is active, and the filesystem supports it, the temporary file will be unlinked while it is open. Otherwise, the file will be visible to this process and other processes and will be unlinked when the process terminates using a procedure registered with atexit. Thus, if MiNT is not active or if the filesystem used does not support unlinking an open file, the temporary file may remain after abnormal program termination.
 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
NOTE

This document was created by man2html, using the manual pages.
Time: 11:14:48 GMT, June 22, 2025