diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-05-24 22:00:55 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-05-24 22:00:55 +0200 |
commit | 7d081114d708c60761e355c555d73ea29460d9a0 (patch) | |
tree | 1f75d10d66b5d552062f9b27a793d1fe404043b0 | |
parent | de5a5ce0b4c7e44af163cc7bfc49acc631d6550e (diff) | |
download | psutil-7d081114d708c60761e355c555d73ea29460d9a0.tar.gz |
try to fix osx hanging
-rw-r--r-- | psutil/tests/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index 665232a9..c6e8eff3 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -499,6 +499,12 @@ def terminate(proc_or_pid, sig=signal.SIGTERM, wait_timeout=GLOBAL_TIMEOUT): pass def sendsig(proc, sig): + if MACOS and GITHUB_WHEELS: + sig = signal.SIGKILL + # If the process received SIGSTOP, SIGCONT is necessary first, + # otherwise SIGTERM won't work. + if POSIX and sig != signal.SIGKILL: + proc.send_signal(signal.SIGCONT) proc.send_signal(sig) def term_subproc(proc, timeout): |