mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Try/except psutil process access in OSX
Refs https://github.com/saltstack/qa/issues/244
This commit is contained in:
parent
098cf87a6b
commit
d0f44c95f5
@ -184,10 +184,16 @@ except ImportError:
|
|||||||
kill_children(children)
|
kill_children(children)
|
||||||
|
|
||||||
if children:
|
if children:
|
||||||
psutil.wait_procs(children, timeout=10, callback=lambda proc: kill_children(children, terminate=True))
|
try:
|
||||||
|
psutil.wait_procs(children, timeout=10, callback=lambda proc: kill_children(children, terminate=True))
|
||||||
|
except psutil.AccessDenied:
|
||||||
|
kill_children(children, terminate=True)
|
||||||
|
|
||||||
if children:
|
if children:
|
||||||
psutil.wait_procs(children, timeout=5, callback=lambda proc: kill_children(children, kill=True))
|
try:
|
||||||
|
psutil.wait_procs(children, timeout=5, callback=lambda proc: kill_children(children, kill=True))
|
||||||
|
except psutils.AccessDenied:
|
||||||
|
kill_children(children, kill=True)
|
||||||
|
|
||||||
SYS_TMP_DIR = os.path.realpath(
|
SYS_TMP_DIR = os.path.realpath(
|
||||||
# Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
|
# Avoid ${TMPDIR} and gettempdir() on MacOS as they yield a base path too long
|
||||||
|
Loading…
Reference in New Issue
Block a user