diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-20 18:43:10 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-20 18:43:10 -0700 |
commit | 8603b29c85a480e24d46e7b4bd94fab7c83ce4b2 (patch) | |
tree | 71038523ca221d80f574c68e431b7414c7843a0c /bin/ebuild-ipc.py | |
parent | Fix ebuild-ipc to correctly handle non-zero return codes from (diff) | |
download | portage-8603b29c85a480e24d46e7b4bd94fab7c83ce4b2.tar.gz portage-8603b29c85a480e24d46e7b4bd94fab7c83ce4b2.tar.bz2 portage-8603b29c85a480e24d46e7b4bd94fab7c83ce4b2.zip |
Make ebuild-ipc kill the child IO process before it exits due to timeout.
Diffstat (limited to 'bin/ebuild-ipc.py')
-rwxr-xr-x | bin/ebuild-ipc.py | 9 |
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(): |