mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-25 11:19:52 +01:00
Call killpg only if setsid is enabled
This commit is contained in:
parent
a91e7be005
commit
71aed22539
@ -1,3 +1,8 @@
|
||||
NEW IN WAF 1.9.4
|
||||
----------------
|
||||
* Enable 'waf dist' in arbitrary paths #1806
|
||||
* Handle subprocess timeouts in Python 3.3 #1807
|
||||
|
||||
NEW IN WAF 1.9.3
|
||||
----------------
|
||||
* Improve the behaviour of parallel configuration tests (conf.multicheck) #1793
|
||||
|
@ -865,9 +865,9 @@ def run_regular_process(cmd, kwargs, cargs={}):
|
||||
try:
|
||||
out, err = proc.communicate(**cargs)
|
||||
except TimeoutExpired:
|
||||
try:
|
||||
if kwargs.get('start_new_session') and hasattr(os, 'killpg'):
|
||||
os.killpg(proc.pid, signal.SIGKILL)
|
||||
except AttributeError:
|
||||
else:
|
||||
proc.kill()
|
||||
out, err = proc.communicate()
|
||||
raise TimeoutExpired(proc.args, timeout=cargs['timeout'], output=out, stderr=err)
|
||||
@ -877,9 +877,9 @@ def run_regular_process(cmd, kwargs, cargs={}):
|
||||
try:
|
||||
status = proc.wait(**cargs)
|
||||
except TimeoutExpired as e:
|
||||
try:
|
||||
if kwargs.get('start_new_session') and hasattr(os, 'killpg'):
|
||||
os.killpg(proc.pid, signal.SIGKILL)
|
||||
except AttributeError:
|
||||
else:
|
||||
proc.kill()
|
||||
proc.wait()
|
||||
raise e
|
||||
|
@ -34,9 +34,9 @@ def run():
|
||||
try:
|
||||
out, err = proc.communicate(**cargs)
|
||||
except TimeoutExpired:
|
||||
try:
|
||||
if kwargs.get('start_new_session') and hasattr(os, 'killpg'):
|
||||
os.killpg(proc.pid, signal.SIGKILL)
|
||||
except AttributeError:
|
||||
else:
|
||||
proc.kill()
|
||||
out, err = proc.communicate()
|
||||
raise TimeoutExpired(proc.args, timeout=cargs['timeout'], output=out, stderr=err)
|
||||
|
Loading…
Reference in New Issue
Block a user