summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-20 18:43:10 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-20 18:43:10 -0700
commit8603b29c85a480e24d46e7b4bd94fab7c83ce4b2 (patch)
tree71038523ca221d80f574c68e431b7414c7843a0c
parentFix ebuild-ipc to correctly handle non-zero return codes from (diff)
downloadportage-8603b29c85a480e24d46e7b4bd94fab7c83ce4b2.tar.gz
portage-8603b29c85a480e24d46e7b4bd94fab7c83ce4b2.tar.bz2
portage-8603b29c85a480e24d46e7b4bd94fab7c83ce4b2.zip
Make ebuild-ipc kill the child IO process before it exits due to timeout.
-rwxr-xr-xbin/ebuild-ipc.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index 9f6157dda..af152e11e 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -112,6 +112,13 @@ class EbuildIpc(object):
self._timeout_retry_msg(start_time, msg)
else:
self._no_daemon_msg()
+ try:
+ os.kill(pid, signal.SIGKILL)
+ os.wait()
+ except OSError as e:
+ portage.util.writemsg_level(
+ "ebuild-ipc: %s\n" % (e,),
+ level=logging.ERROR, noiselevel=-1)
return 2
if not os.WIFEXITED(wait_retval[1]):
@@ -200,7 +207,7 @@ class EbuildIpc(object):
portage.util.writemsg_level(
"ebuild-ipc: %s: %s\n" % (msg,
portage.localization._('subprocess failure: %s') % \
- wait_retval[1]), level=logging.ERROR, noiselevel=-1)
+ retval), level=logging.ERROR, noiselevel=-1)
return retval
if not self._daemon_is_alive():