*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> tmpfile (3)              
Title
Content
Arch
Section
 

TMPFILE(3)

Contents


NAME    [Toc]    [Back]

       tmpfile - create a temporary file

SYNOPSIS    [Toc]    [Back]

       #include <stdio.h>

       FILE *tmpfile (void);

DESCRIPTION    [Toc]    [Back]

       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    [Toc]    [Back]

       The tmpfile() function returns a stream descriptor, or NULL if a unique
       filename cannot be generated or the unique file cannot be opened.

ERRORS    [Toc]    [Back]

       EACCES Search permission denied for directory in file's path prefix.

       EEXIST Unable to generate a unique filename.

       EMFILE Too many file descriptors in use by process.

       ENFILE Too many files open in system.

       EROFS  Read-only filesystem.

CONFORMING TO    [Toc]    [Back]

       SVID 3, POSIX, BSD 4.3, ISO 9899, SUSv2

SEE ALSO    [Toc]    [Back]

      
      
       mktemp(3), mkstemp(3), tmpnam(3), tempnam(3)



GNU				  1993-04-03			    TMPFILE(3)
[ Back ]
 Similar pages
Name OS Title
tmpnam IRIX create a name for a temporary file
tempnam Linux create a name for a temporary file
tmpnam Linux create a name for a temporary file
mkstemp Linux create a unique temporary file
tempfile Linux create a temporary file in a safe manner
tempnam Tru64 Construct the name for a temporary file
tmpnam FreeBSD temporary file routines
tempnam FreeBSD temporary file routines
tempnam OpenBSD temporary file routines
tmpfile FreeBSD temporary file routines
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service