Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
178f812f
Commit
178f812f
authored
Mar 10, 1998
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Logical markup.
parent
c4f79e4b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
24 deletions
+22
-24
Doc/lib/libtempfile.tex
Doc/lib/libtempfile.tex
+11
-12
Doc/libtempfile.tex
Doc/libtempfile.tex
+11
-12
No files found.
Doc/lib/libtempfile.tex
View file @
178f812f
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
\indexii
{
temporary
}{
file name
}
\indexii
{
temporary
}{
file name
}
\indexii
{
temporary
}{
file
}
\indexii
{
temporary
}{
file
}
\setindexsubitem
{
(in module tempfile)
}
This module generates temporary file names. It is not
\UNIX
{}
specific,
This module generates temporary file names. It is not
\UNIX
{}
specific,
but it may require some help on non-
\UNIX
{}
systems.
but it may require some help on non-
\UNIX
{}
systems.
...
@@ -22,30 +21,30 @@ will return the same filename.
...
@@ -22,30 +21,30 @@ will return the same filename.
The module uses two global variables that tell it how to construct a
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
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
}
\begin{datadesc}
{
tempdir
}
When set to a value other than
\code
{
None
}
, this variable defines the
When set to a value other than
\code
{
None
}
, this variable defines the
directory in which filenames returned by
\
code
{
mktemp()
}
reside. The
directory in which filenames returned by
\
function
{
mktemp()
}
reside.
default is taken from the environment variable
\code
{
TMPDIR
}
; if this
The default is taken from the environment variable
\code
{
TMPDIR
}
; if
is not set, either
\file
{
/usr/tmp
}
is used (on
\UNIX
{}
), or the current
this is not set, either
\file
{
/usr/tmp
}
is used (on
\UNIX
{}
), or the
working directory (all other systems). No check is made to see
current working directory (all other systems). No check is made to
whether its value is valid.
see
whether its value is valid.
\end{datadesc}
\end{datadesc}
\ttindex
{
TMPDIR
}
\ttindex
{
TMPDIR
}
\begin{datadesc}
{
template
}
\begin{datadesc}
{
template
}
When set to a value other than
\code
{
None
}
, this variable defines the
When set to a value other than
\code
{
None
}
, this variable defines the
prefix of the final component of the filenames returned by
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
unique filenames. The default is either
\file
{
@
\var
{
pid
}
.
}
where
\var
{
pid
}
is the current process ID (on
\UNIX
{}
), or
\file
{
tmp
}
(all
\var
{
pid
}
is the current process ID (on
\UNIX
{}
), or
\file
{
tmp
}
(all
other systems).
other systems).
\end{datadesc}
\end{datadesc}
Warning: if a
\UNIX
{}
process uses
\code
{
mktemp()
}
, then calls
\strong
{
Warning:
}
if a
\UNIX
{}
process uses
\code
{
mktemp()
}
, then
\code
{
fork()
}
and both parent and child continue to use
calls
\function
{
fork()
}
and both parent and child continue to use
\
code
{
mktemp()
}
, the processes will generate conflicting temporary
\
function
{
mktemp()
}
, the processes will generate conflicting temporary
names. To resolve this, the child process should assign
\code
{
None
}
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
{
template
}
, to force recomputing the default on the next call
to
\
code
{
mktemp()
}
.
to
\
function
{
mktemp()
}
.
Doc/libtempfile.tex
View file @
178f812f
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
\indexii
{
temporary
}{
file name
}
\indexii
{
temporary
}{
file name
}
\indexii
{
temporary
}{
file
}
\indexii
{
temporary
}{
file
}
\setindexsubitem
{
(in module tempfile)
}
This module generates temporary file names. It is not
\UNIX
{}
specific,
This module generates temporary file names. It is not
\UNIX
{}
specific,
but it may require some help on non-
\UNIX
{}
systems.
but it may require some help on non-
\UNIX
{}
systems.
...
@@ -22,30 +21,30 @@ will return the same filename.
...
@@ -22,30 +21,30 @@ will return the same filename.
The module uses two global variables that tell it how to construct a
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
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
}
\begin{datadesc}
{
tempdir
}
When set to a value other than
\code
{
None
}
, this variable defines the
When set to a value other than
\code
{
None
}
, this variable defines the
directory in which filenames returned by
\
code
{
mktemp()
}
reside. The
directory in which filenames returned by
\
function
{
mktemp()
}
reside.
default is taken from the environment variable
\code
{
TMPDIR
}
; if this
The default is taken from the environment variable
\code
{
TMPDIR
}
; if
is not set, either
\file
{
/usr/tmp
}
is used (on
\UNIX
{}
), or the current
this is not set, either
\file
{
/usr/tmp
}
is used (on
\UNIX
{}
), or the
working directory (all other systems). No check is made to see
current working directory (all other systems). No check is made to
whether its value is valid.
see
whether its value is valid.
\end{datadesc}
\end{datadesc}
\ttindex
{
TMPDIR
}
\ttindex
{
TMPDIR
}
\begin{datadesc}
{
template
}
\begin{datadesc}
{
template
}
When set to a value other than
\code
{
None
}
, this variable defines the
When set to a value other than
\code
{
None
}
, this variable defines the
prefix of the final component of the filenames returned by
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
unique filenames. The default is either
\file
{
@
\var
{
pid
}
.
}
where
\var
{
pid
}
is the current process ID (on
\UNIX
{}
), or
\file
{
tmp
}
(all
\var
{
pid
}
is the current process ID (on
\UNIX
{}
), or
\file
{
tmp
}
(all
other systems).
other systems).
\end{datadesc}
\end{datadesc}
Warning: if a
\UNIX
{}
process uses
\code
{
mktemp()
}
, then calls
\strong
{
Warning:
}
if a
\UNIX
{}
process uses
\code
{
mktemp()
}
, then
\code
{
fork()
}
and both parent and child continue to use
calls
\function
{
fork()
}
and both parent and child continue to use
\
code
{
mktemp()
}
, the processes will generate conflicting temporary
\
function
{
mktemp()
}
, the processes will generate conflicting temporary
names. To resolve this, the child process should assign
\code
{
None
}
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
{
template
}
, to force recomputing the default on the next call
to
\
code
{
mktemp()
}
.
to
\
function
{
mktemp()
}
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment