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
b95caff5
Commit
b95caff5
authored
Mar 24, 2006
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify cases when waitpid might not return self.pid.
parent
478c82d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Lib/popen2.py
Lib/popen2.py
+5
-2
No files found.
Lib/popen2.py
View file @
b95caff5
...
@@ -94,6 +94,7 @@ class Popen3:
...
@@ -94,6 +94,7 @@ class Popen3:
if
self
.
sts
<
0
:
if
self
.
sts
<
0
:
try
:
try
:
pid
,
sts
=
os
.
waitpid
(
self
.
pid
,
os
.
WNOHANG
)
pid
,
sts
=
os
.
waitpid
(
self
.
pid
,
os
.
WNOHANG
)
# pid will be 0 if self.pid hasn't terminated
if
pid
==
self
.
pid
:
if
pid
==
self
.
pid
:
self
.
sts
=
sts
self
.
sts
=
sts
except
os
.
error
:
except
os
.
error
:
...
@@ -105,7 +106,9 @@ class Popen3:
...
@@ -105,7 +106,9 @@ class Popen3:
"""Wait for and return the exit status of the child process."""
"""Wait for and return the exit status of the child process."""
if
self
.
sts
<
0
:
if
self
.
sts
<
0
:
pid
,
sts
=
os
.
waitpid
(
self
.
pid
,
0
)
pid
,
sts
=
os
.
waitpid
(
self
.
pid
,
0
)
if
pid
==
self
.
pid
:
# This used to be a test, but it is believed to be
# always true, so I changed it to an assertion - mvl
assert
pid
==
self
.
pid
self
.
sts
=
sts
self
.
sts
=
sts
return
self
.
sts
return
self
.
sts
...
...
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