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
024364a8
Commit
024364a8
authored
Sep 15, 2015
by
Victor Stinner
Browse files
Options
Browse Files
Download
Plain Diff
Merge 3.5 (os.waitpid)
parents
13e457c8
d3ffd327
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
2 deletions
+10
-2
Lib/test/test_os.py
Lib/test/test_os.py
+6
-0
Misc/NEWS
Misc/NEWS
+2
-0
Modules/posixmodule.c
Modules/posixmodule.c
+2
-2
No files found.
Lib/test/test_os.py
View file @
024364a8
...
...
@@ -2077,6 +2077,12 @@ class PidTests(unittest.TestCase):
# We are the parent of our subprocess
self
.
assertEqual
(
int
(
stdout
),
os
.
getpid
())
def
test_waitpid
(
self
):
args
=
[
sys
.
executable
,
'-c'
,
'pass'
]
pid
=
os
.
spawnv
(
os
.
P_NOWAIT
,
args
[
0
],
args
)
status
=
os
.
waitpid
(
pid
,
0
)
self
.
assertEqual
(
status
,
(
pid
,
0
))
# The introduction of this TestCase caused at least two different errors on
# *nix buildbots. Temporarily skip this to let the buildbots move along.
...
...
Misc/NEWS
View file @
024364a8
...
...
@@ -103,6 +103,8 @@ Core and Builtins
Library
-------
-
Issue
#
25118
:
Fix
a
regression
of
Python
3.5.0
in
os
.
waitpid
()
on
Windows
.
-
Issue
#
24684
:
socket
.
socket
.
getaddrinfo
()
now
calls
PyUnicode_AsEncodedString
()
instead
of
calling
the
encode
()
method
of
the
host
,
to
handle
correctly
custom
string
with
an
encode
()
method
which
doesn
't
...
...
Modules/posixmodule.c
View file @
024364a8
...
...
@@ -7021,7 +7021,7 @@ os_waitpid_impl(PyModuleDef *module, Py_intptr_t pid, int options)
res
=
_cwait
(
&
status
,
pid
,
options
);
Py_END_ALLOW_THREADS
}
while
(
res
<
0
&&
errno
==
EINTR
&&
!
(
async_err
=
PyErr_CheckSignals
()));
if
(
res
!=
0
)
if
(
res
<
0
)
return
(
!
async_err
)
?
posix_error
()
:
NULL
;
/* shift the status left a byte so this is more like the POSIX waitpid */
...
...
@@ -7731,7 +7731,7 @@ os_open_impl(PyModuleDef *module, path_t *path, int flags, int mode,
}
while
(
fd
<
0
&&
errno
==
EINTR
&&
!
(
async_err
=
PyErr_CheckSignals
()));
_Py_END_SUPPRESS_IPH
if
(
fd
==
-
1
)
{
if
(
fd
<
0
)
{
if
(
!
async_err
)
PyErr_SetFromErrnoWithFilenameObject
(
PyExc_OSError
,
path
->
object
);
return
-
1
;
...
...
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