Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fopen(3)

mktemp(3)

tmpnam(3)

unlink(2)

getdtablesize(2)

tmpfile(3)  —  Subroutines

NAME

tmpfile −  Creates a temporary file

LIBRARY

Standard I/O Package (libc.a)

SYNOPSIS

#include <stdio.h> FILE ∗tmpfile ( void );

DESCRIPTION

The tmpfile() function 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. 

NOTES

AES Support Level:  Full use

RETURN VALUES

Upon successful completion, the tmpfile() function returns a pointer to the stream of the file that is created.  Otherwise, it returns a null pointer and sets errno to indicate the error. 

ERRORS

If the tmpfile() function fails, errno may be set to one of the following values:

[EMFILE]OPEN_MAX file descriptors are currently open in the calling process. 

[EMFILE]All available file descriptors are currently open in the calling process. 

[ENFILE]Too many files are currently open in the system. 

[ENOSPC]The directory or file system that would contain the new file cannot be expanded. 

RELATED INFORMATION

Functions: fopen(3), mktemp(3), tmpnam(3), unlink(2), getdtablesize(2)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026