tmpfile man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

tmpfile(3C)		 Standard C Library Functions		   tmpfile(3C)

NAME
       tmpfile - create a temporary file

SYNOPSIS
       #include <stdio.h>

       FILE *tmpfile(void);

DESCRIPTION
       The tmpfile() function creates a temporary file and opens a correspond‐
       ing stream.  The file will automatically be deleted when all references
       to  the file are closed.	 The file is opened as in fopen(3C) for update
       (w+).

       The largest value that can be represented correctly  in	an  object  of
       type  off_t  will be established as the offset maximum in the open file
       description.

RETURN VALUES
       Upon successful completion, tmpfile() 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
       The tmpfile() function will fail if:

       EINTR	       A signal was caught during the execution of tmpfile().

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

       ENFILE	       The maximum allowable number of files is currently open
		       in the system.

       ENOSPC	       The directory or file system which  would  contain  the
		       new file cannot be expanded.

       The tmpfile() function may fail if:

       EMFILE	       There are FOPEN_MAX streams currently open in the call‐
		       ing process.

       ENOMEM	       Insufficient storage space is available.

USAGE
       The stream refers to a file which  is  unlinked.	  If  the  process  is
       killed  in  the period between file creation and unlinking, a permanent
       file may be left behind.

       The tmpfile() function has a transitional  interface  for  64-bit  file
       offsets. See lf64(5).

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Interface Stability	     │Standard			   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       unlink(2),  fopen(3C),  mkstemp(3C),  mktemp(3C),  tmpnam(3C), lf64(5),
       standards(5)

SunOS 5.10			  4 Aug 2003			   tmpfile(3C)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net