tmpfile(3S)


tmpfile, tmpfile64 -- create a temporary file

Synopsis

   #include <stdio.h>
   

FILE *tmpfile (void);

FILE *tmpfile64 (void);

Description

tmpfile creates a temporary file using a name generated by the tmpnam(3S) 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+'').

References

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

Notices

Considerations for large file support

tmpfile64 supports large files, but is otherwise identical to tmpfile. For details on programming for large file capable applications, see ``Large File Support'' on intro(3).
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004