File:  [MW Coherent from dump] / coherent / a / usr / man / ALL / tmpnam
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:34 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent



tmpnam()                 General Function                tmpnam()




Generate a unique name for a temporary file

#include <stdio.h>
cchhaarr *ttmmppnnaamm(_n_a_m_e);
cchhaarr *_n_a_m_e;

tmpnam constructs  a unique name for a  file.  The names returned
by tmpnam generally are mechanical concatenations of letters, and
therefore  are mostly  used to  name  temporary files,  which are
never seen by the user.  Unlike a file created by tmpfile, a file
named by tmpnam does not automatically disappear when the program
exits.  It must be  explicitly removed before the program ends if
you want it to disappear.

name points  to the buffer  into which tmpnam writes  the name it
generates.  If  name is set to NULL, tmpnam  writes the name into
an internal  buffer that  may be  overwritten each time  you call
this function.

tmpnam  returns a  pointer  to the  temporary  name.  Unlike  the
related function tempnam,  tmpnam assumes that the temporary file
will be  written into directory  /tmp and builds  the name accor-
dingly.

***** Example *****

For an example of this function, see execve.

***** See Also *****

general functions, mktemp(), STDIO, tempnam()

***** Notes *****

If you want  the file name to be written  into buffer, you should
allocate at  least L_tmpnam bytes  of memory for  it; L_tmpnam is
defined in the header stdio.h.



















COHERENT Lexicon                                           Page 1



unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.