summaryrefslogtreecommitdiff
path: root/buildstream/plugin.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-06-13 23:46:56 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-06-13 23:52:18 +0900
commitb3e2567a30b0fdbe03a1a0fdce847f3854094712 (patch)
treeebbd6c18f0954c24b3e9c22efaa49839da54e33c /buildstream/plugin.py
parentd13ef0ac12224647c665171fb65ce60e760b840a (diff)
downloadbuildstream-b3e2567a30b0fdbe03a1a0fdce847f3854094712.tar.gz
plugin.py: Use utils._kill_proc_tree()
Instead of doing this manually, we're gonna share that code.
Diffstat (limited to 'buildstream/plugin.py')
-rw-r--r--buildstream/plugin.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/buildstream/plugin.py b/buildstream/plugin.py
index 16ab0a701..ec5c6d600 100644
--- a/buildstream/plugin.py
+++ b/buildstream/plugin.py
@@ -26,7 +26,6 @@ import sys
from subprocess import CalledProcessError
from contextlib import contextmanager
from weakref import WeakValueDictionary
-import psutil
from . import _yaml, _signals
from . import utils
@@ -526,11 +525,7 @@ class Plugin():
# the temp directories which we control and cleanup
# ourselves.
#
- proc = psutil.Process(process.pid)
- children = proc.children(recursive=True)
- for child in children:
- child.kill()
- proc.kill()
+ utils._kill_process_tree(process.pid)
def suspend_proc():
if process: