From aa2159e1a3eeb0c82bee22c54a8739d578639761 Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Mon, 12 Nov 2007 11:16:06 -0500 Subject: import all changes from the bzr branch as a single changeset --- tempfile.1 | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'tempfile.1') diff --git a/tempfile.1 b/tempfile.1 index 904f4cd..69a9f36 100644 --- a/tempfile.1 +++ b/tempfile.1 @@ -1,8 +1,8 @@ .\" -*- nroff -*- -.TH TEMPFILE 1 "20 December 2004" "Debian" +.TH TEMPFILE 1 "3 June 2007" "Debian" .SH NAME tempfile \- create a temporary file in a safe manner -.SH SYNOPSYS +.SH SYNOPSIS .B tempfile [\-d DIR] [\-p STRING] [\-s STRING] [\-m MODE] [\-n FILE] [\-\-directory=DIR] [\-\-prefix=STRING] [\-\-suffix=STRING] [\-\-mode=MODE] [\-\-name=FILE] [\-\-help] [\-\-version] @@ -14,11 +14,12 @@ creates a temporary file in a safe manner. It uses to choose the name and opens it with O_RDWR | O_CREAT | O_EXCL. The filename is printed on standard output. .PP -The directory to place the file is searched for in the following order: +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 is writable. +if it exists. .IP b) The directory specified by the .B --directory @@ -26,6 +27,10 @@ argument, if given. .IP c) The directory .IR /tmp . +.PP +See +.BR tempnam (3) +for the actual steps involved in directory selection. .SH OPTIONS .TP .BI "-d, --directory " DIR @@ -46,12 +51,12 @@ Use FILE for the name instead of The options -d, -p, and -s are ignored if this option is given. .TP .B "--help" -Print a usage message on standard output and exit succesfully. +Print a usage message on standard output and exit successfully. .TP .B "--version" -Print version information on standard output and exist succesfully. +Print version information on standard output and exit successfully. .SH RETURN VALUES -An exit status of 0 means the temporary file was created succesfully. +An exit status of 0 means the temporary file was created successfully. Any other exit status indicates an error. .SH BUGS Exclusive creation is not guaranteed when creating files on NFS -- cgit v1.2.3