mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
gh-131913: multiprocessing: add interrupt for POSIX (GH-132453)
* multiprocessing: interrupt Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
parent
862fd89036
commit
77605fa3bb
6 changed files with 54 additions and 2 deletions
|
@ -54,6 +54,9 @@ class Popen(object):
|
|||
if self.wait(timeout=0.1) is None:
|
||||
raise
|
||||
|
||||
def interrupt(self):
|
||||
self._send_signal(signal.SIGINT)
|
||||
|
||||
def terminate(self):
|
||||
self._send_signal(signal.SIGTERM)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue