summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libtempfile.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-03-10 03:38:31 (GMT)
committerFred Drake <fdrake@acm.org>1998-03-10 03:38:31 (GMT)
commit92f31f1260637a3933aea12d38483322d71d7deb (patch)
tree7e07f1e98c8bdda765f9a0537e229cd234df995b /Doc/lib/libtempfile.tex
parenta44d74086c07818f387902d7a6035a142c8f36e1 (diff)
downloadcpython-92f31f1260637a3933aea12d38483322d71d7deb.zip
cpython-92f31f1260637a3933aea12d38483322d71d7deb.tar.gz
cpython-92f31f1260637a3933aea12d38483322d71d7deb.tar.bz2
Logical markup.
Diffstat (limited to 'Doc/lib/libtempfile.tex')
-rw-r--r--Doc/lib/libtempfile.tex23
1 files changed, 11 insertions, 12 deletions
diff --git a/Doc/lib/libtempfile.tex b/Doc/lib/libtempfile.tex
index d1cd205..7832aa2 100644
--- a/Doc/lib/libtempfile.tex
+++ b/Doc/lib/libtempfile.tex
@@ -4,7 +4,6 @@
\indexii{temporary}{file name}
\indexii{temporary}{file}
-\setindexsubitem{(in module tempfile)}
This module generates temporary file names. It is not \UNIX{} specific,
but it may require some help on non-\UNIX{} systems.
@@ -22,30 +21,30 @@ will return the same filename.
The module uses two global variables that tell it how to construct a
temporary name. The caller may assign values to them; by default they
-are initialized at the first call to \code{mktemp()}.
+are initialized at the first call to \function{mktemp()}.
\begin{datadesc}{tempdir}
When set to a value other than \code{None}, this variable defines the
-directory in which filenames returned by \code{mktemp()} reside. The
-default is taken from the environment variable \code{TMPDIR}; if this
-is not set, either \file{/usr/tmp} is used (on \UNIX{}), or the current
-working directory (all other systems). No check is made to see
-whether its value is valid.
+directory in which filenames returned by \function{mktemp()} reside.
+The default is taken from the environment variable \code{TMPDIR}; if
+this is not set, either \file{/usr/tmp} is used (on \UNIX{}), or the
+current working directory (all other systems). No check is made to
+see whether its value is valid.
\end{datadesc}
\ttindex{TMPDIR}
\begin{datadesc}{template}
When set to a value other than \code{None}, this variable defines the
prefix of the final component of the filenames returned by
-\code{mktemp()}. A string of decimal digits is added to generate
+\function{mktemp()}. A string of decimal digits is added to generate
unique filenames. The default is either \file{@\var{pid}.} where
\var{pid} is the current process ID (on \UNIX{}), or \file{tmp} (all
other systems).
\end{datadesc}
-Warning: if a \UNIX{} process uses \code{mktemp()}, then calls
-\code{fork()} and both parent and child continue to use
-\code{mktemp()}, the processes will generate conflicting temporary
+\strong{Warning:} if a \UNIX{} process uses \code{mktemp()}, then
+calls \function{fork()} and both parent and child continue to use
+\function{mktemp()}, the processes will generate conflicting temporary
names. To resolve this, the child process should assign \code{None}
to \code{template}, to force recomputing the default on the next call
-to \code{mktemp()}.
+to \function{mktemp()}.