diff options
author | Manoj Srivastava <srivasta@debian.org> | 2009-05-01 14:54:00 -0500 |
---|---|---|
committer | Clint Adams <schizo@debian.org> | 2009-05-01 17:56:41 -0400 |
commit | 2e41d9783a8ff4957ee517bfe66555ef99cb840d (patch) | |
tree | 580236f4ed447064407910180a5e4a9fa5a30b8f | |
parent | ddf64b6f8b0958fbb0fa015c7b66dde0f2095906 (diff) | |
download | debianutils-2e41d9783a8ff4957ee517bfe66555ef99cb840d.tar.gz |
Update manual page with uptodate tempnam behavious
This commit emhhasize that tempnam(3) should be looked at for
authoritative answers as to behavour of the command wrt TMPDIR and such,
and updates the potential actions taken based on more recent tempnam man
pages.
Signed-Off-By: Manoj Srivastava <srivasta@debian.org>
Signed-off-by: Manoj Srivastava <srivasta@debian.org>
-rw-r--r-- | tempfile.1 | 44 |
1 files changed, 28 insertions, 16 deletions
@@ -12,25 +12,37 @@ tempfile \- create a temporary file in a safe manner creates a temporary file in a safe manner. It uses .BR tempnam (3) to choose the name and opens it with O_RDWR | O_CREAT | O_EXCL. The filename -is printed on standard output. +is printed on standard output. See +.BR tempnam (3) +for the actual steps involved in directory selection. .PP The directory in which to create the file might be searched for in this -order: -.IP a) -The directory specified by the environment variable -.BR TMPDIR , -if it exists. -.IP b) -The directory specified by the -.B --directory -argument, if given. -.IP c) -The directory -.IR /tmp . -.PP -See +order (but refer to .BR tempnam (3) -for the actual steps involved in directory selection. +for authoritative answers): +.TP 3 +a) +In case the environment variable +.B TMPDIR +exists and +contains the name of an appropriate directory, that is used. +.TP +b) +Otherwise, if the +.I \-\-directory +argument is specified and appropriate, it is used. +.TP +c) +Otherwise, +.I P_tmpdir +(as defined in +.IR <stdio.h> ) +is used when appropriate. +.TP +d) +Finally an implementation-defined directory +.IR (/tmp) +may be used. .SH OPTIONS .TP .BI "-d, --directory " DIR |