mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-06 09:20:57 +01:00
attempted fix for PermissionError and ProcessLookupError on Cygwin
This commit is contained in:
parent
d038b4ba1d
commit
5c6e7857ac
1 changed files with 13 additions and 0 deletions
|
@ -24,6 +24,19 @@ if ON_DARWIN:
|
|||
elif ON_WINDOWS:
|
||||
pass
|
||||
|
||||
elif ON_CYGWIN:
|
||||
# Similar to what happened on OSX, more issues on Cygwin
|
||||
# (see Github issue #514).
|
||||
def _send_signal(job, signal):
|
||||
try:
|
||||
os.killpg(job['pgrp'], signal)
|
||||
except (PermissionError, ProcessLookupError):
|
||||
for pid in job['pids']:
|
||||
try:
|
||||
os.kill(pid, signal)
|
||||
except:
|
||||
pass
|
||||
|
||||
else:
|
||||
def _send_signal(job, signal):
|
||||
os.killpg(job['pgrp'], signal)
|
||||
|
|
Loading…
Add table
Reference in a new issue