@@ -4,7 +4,6 @@ \section{Standard Module \sectcode{tempfile}}
44\indexii {temporary}{file name}
55\indexii {temporary}{file}
66
7- \setindexsubitem {(in module tempfile)}
87
98This module generates temporary file names. It is not \UNIX {} specific,
109but it may require some help on non-\UNIX {} systems.
@@ -22,30 +21,30 @@ \section{Standard Module \sectcode{tempfile}}
2221
2322The module uses two global variables that tell it how to construct a
2423temporary name. The caller may assign values to them; by default they
25- are initialized at the first call to \code {mktemp()}.
24+ are initialized at the first call to \function {mktemp()}.
2625
2726\begin {datadesc }{tempdir}
2827When set to a value other than \code {None}, this variable defines the
29- directory in which filenames returned by \code {mktemp()} reside. The
30- default is taken from the environment variable \code {TMPDIR}; if this
31- is not set, either \file {/usr/tmp} is used (on \UNIX {}), or the current
32- working directory (all other systems). No check is made to see
33- whether its value is valid.
28+ directory in which filenames returned by \function {mktemp()} reside.
29+ The default is taken from the environment variable \code {TMPDIR}; if
30+ this is not set, either \file {/usr/tmp} is used (on \UNIX {}), or the
31+ current working directory (all other systems). No check is made to
32+ see whether its value is valid.
3433\end {datadesc }
3534\ttindex {TMPDIR}
3635
3736\begin {datadesc }{template}
3837When set to a value other than \code {None}, this variable defines the
3938prefix of the final component of the filenames returned by
40- \code {mktemp()}. A string of decimal digits is added to generate
39+ \function {mktemp()}. A string of decimal digits is added to generate
4140unique filenames. The default is either \file {@\var {pid}.} where
4241\var {pid} is the current process ID (on \UNIX {}), or \file {tmp} (all
4342other systems).
4443\end {datadesc }
4544
46- Warning: if a \UNIX {} process uses \code {mktemp()}, then calls
47- \code {fork()} and both parent and child continue to use
48- \code {mktemp()}, the processes will generate conflicting temporary
45+ \strong { Warning:} if a \UNIX {} process uses \code {mktemp()}, then
46+ calls \function {fork()} and both parent and child continue to use
47+ \function {mktemp()}, the processes will generate conflicting temporary
4948names. To resolve this, the child process should assign \code {None}
5049to \code {template}, to force recomputing the default on the next call
51- to \code {mktemp()}.
50+ to \function {mktemp()}.
0 commit comments