summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@debian.org>2009-05-01 14:54:00 -0500
committerClint Adams <schizo@debian.org>2009-05-01 17:56:41 -0400
commit2e41d9783a8ff4957ee517bfe66555ef99cb840d (patch)
tree580236f4ed447064407910180a5e4a9fa5a30b8f
parentddf64b6f8b0958fbb0fa015c7b66dde0f2095906 (diff)
downloaddebianutils-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.144
1 files changed, 28 insertions, 16 deletions
diff --git a/tempfile.1 b/tempfile.1
index 99b2067..9dc9ec9 100644
--- a/tempfile.1
+++ b/tempfile.1
@@ -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