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
2eba6ad7
Commit
2eba6ad7
authored
Oct 21, 2019
by
Dong-hee Na
Committed by
Serhiy Storchaka
Oct 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-38493: Add os.CLD_KILLED and os.CLD_STOPPED. (GH-16821)
parent
a9ed91e6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
0 deletions
+29
-0
Doc/library/os.rst
Doc/library/os.rst
+5
-0
Doc/whatsnew/3.9.rst
Doc/whatsnew/3.9.rst
+6
-0
Lib/test/test_posix.py
Lib/test/test_posix.py
+10
-0
Misc/NEWS.d/next/Library/2019-10-16-19-56-51.bpo-38493.86ExWB.rst
...S.d/next/Library/2019-10-16-19-56-51.bpo-38493.86ExWB.rst
+2
-0
Modules/posixmodule.c
Modules/posixmodule.c
+6
-0
No files found.
Doc/library/os.rst
View file @
2eba6ad7
...
...
@@ -3946,8 +3946,10 @@ written in Python, such as a mail server's external command delivery program.
.. data:: CLD_EXITED
CLD_KILLED
CLD_DUMPED
CLD_TRAPPED
CLD_STOPPED
CLD_CONTINUED
These are the possible values for :attr:`si_code` in the result returned by
...
...
@@ -3957,6 +3959,9 @@ written in Python, such as a mail server's external command delivery program.
.. versionadded:: 3.3
.. versionchanged:: 3.9
Added :data:`CLD_KILLED` and :data:`CLD_STOPPED` values.
.. function:: waitpid(pid, options)
...
...
Doc/whatsnew/3.9.rst
View file @
2eba6ad7
...
...
@@ -125,6 +125,12 @@ that schedules a shutdown for the default executor that waits on the
:func:`asyncio.run` has been updated to use the new :term:`coroutine`.
(Contributed by Kyle Stanley in :issue:`34037`.)
os
__
Added :data:`~os.CLD_KILLED` and :data:`~os.CLD_STOPPED` for :attr:`si_code`.
(Contributed by Dong-hee Na in :issue:`38493`.)
threading
---------
...
...
Lib/test/test_posix.py
View file @
2eba6ad7
...
...
@@ -1226,6 +1226,16 @@ class PosixTester(unittest.TestCase):
finally
:
posix
.
close
(
f
)
@
unittest
.
skipUnless
(
hasattr
(
signal
,
'SIGCHLD'
),
'CLD_XXXX be placed in si_code for a SIGCHLD signal'
)
@
unittest
.
skipUnless
(
hasattr
(
os
,
'waitid_result'
),
"test needs os.waitid_result"
)
def
test_cld_xxxx_constants
(
self
):
os
.
CLD_EXITED
os
.
CLD_KILLED
os
.
CLD_DUMPED
os
.
CLD_TRAPPED
os
.
CLD_STOPPED
os
.
CLD_CONTINUED
@
unittest
.
skipUnless
(
os
.
symlink
in
os
.
supports_dir_fd
,
"test needs dir_fd support in os.symlink()"
)
def
test_symlink_dir_fd
(
self
):
f
=
posix
.
open
(
posix
.
getcwd
(),
posix
.
O_RDONLY
)
...
...
Misc/NEWS.d/next/Library/2019-10-16-19-56-51.bpo-38493.86ExWB.rst
0 → 100644
View file @
2eba6ad7
Added :data:`~os.CLD_KILLED` and :data:`~os.CLD_STOPPED` for :attr:`si_code`.
Patch by Dong-hee Na.
Modules/posixmodule.c
View file @
2eba6ad7
...
...
@@ -14057,12 +14057,18 @@ all_ins(PyObject *m)
#ifdef CLD_EXITED
if
(
PyModule_AddIntMacro
(
m
,
CLD_EXITED
))
return
-
1
;
#endif
#ifdef CLD_KILLED
if
(
PyModule_AddIntMacro
(
m
,
CLD_KILLED
))
return
-
1
;
#endif
#ifdef CLD_DUMPED
if
(
PyModule_AddIntMacro
(
m
,
CLD_DUMPED
))
return
-
1
;
#endif
#ifdef CLD_TRAPPED
if
(
PyModule_AddIntMacro
(
m
,
CLD_TRAPPED
))
return
-
1
;
#endif
#ifdef CLD_STOPPED
if
(
PyModule_AddIntMacro
(
m
,
CLD_STOPPED
))
return
-
1
;
#endif
#ifdef CLD_CONTINUED
if
(
PyModule_AddIntMacro
(
m
,
CLD_CONTINUED
))
return
-
1
;
#endif
...
...
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