mirror of
https://github.com/python/cpython.git
synced 2025-08-31 22:18:28 +00:00
bpo-30794: added kill() method to multiprocessing.Process (#2528)
* bpo-30794: added kill() method to multiprocessing.Process * Added entries to documentation and NEWS * Refactored test_terminate and test_kill * Fix SIGTERM and SIGKILL being used on Windows for the tests * Added "versionadded" marker to the documentation * Fix trailing whitespace in doc
This commit is contained in:
parent
f474c5a3f3
commit
ba75af7130
6 changed files with 40 additions and 9 deletions
|
@ -122,6 +122,13 @@ class BaseProcess(object):
|
|||
self._check_closed()
|
||||
self._popen.terminate()
|
||||
|
||||
def kill(self):
|
||||
'''
|
||||
Terminate process; sends SIGKILL signal or uses TerminateProcess()
|
||||
'''
|
||||
self._check_closed()
|
||||
self._popen.kill()
|
||||
|
||||
def join(self, timeout=None):
|
||||
'''
|
||||
Wait until child process terminates
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue