summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing/process.py
diff options
context:
space:
mode:
authorVitor Pereira <vmsousapereira@gmail.com>2017-07-18 15:34:23 (GMT)
committerAntoine Pitrou <pitrou@free.fr>2017-07-18 15:34:23 (GMT)
commitba75af713078966cc594fc7f0809ed53c532c58f (patch)
treed55ae73192947f840b4e28457fec3d7fc32f875e /Lib/multiprocessing/process.py
parentf474c5a3f3c1fbc0383800b88e8518d43a52d1d1 (diff)
downloadcpython-ba75af713078966cc594fc7f0809ed53c532c58f.zip
cpython-ba75af713078966cc594fc7f0809ed53c532c58f.tar.gz
cpython-ba75af713078966cc594fc7f0809ed53c532c58f.tar.bz2
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
Diffstat (limited to 'Lib/multiprocessing/process.py')
-rw-r--r--Lib/multiprocessing/process.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/multiprocessing/process.py b/Lib/multiprocessing/process.py
index fde97b7..ce4ce43 100644
--- a/Lib/multiprocessing/process.py
+++ b/Lib/multiprocessing/process.py
@@ -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