summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-03-13 06:47:36 +0000
committerZac Medico <zmedico@gentoo.org>2010-03-13 06:47:36 +0000
commitd80db256ec34b8aac65eda89f2ff2baea5996d5f (patch)
tree21cf4da616b21b2fecf9c4011cc029f184e6f900
parent8bc79c12255c791bde6b1c9e6b6c094ff92a8925 (diff)
downloadportage-d80db256ec34b8aac65eda89f2ff2baea5996d5f.tar.gz
portage-d80db256ec34b8aac65eda89f2ff2baea5996d5f.tar.bz2
portage-d80db256ec34b8aac65eda89f2ff2baea5996d5f.zip
Bug #309001 - Install a SIGPIPE handler inside _exec for all forked processes.
svn path=/main/trunk/; revision=15825
-rw-r--r--pym/portage/process.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/pym/portage/process.py b/pym/portage/process.py
index e7f09cd2d..703e7cc9f 100644
--- a/pym/portage/process.py
+++ b/pym/portage/process.py
@@ -343,6 +343,9 @@ def _exec(binary, mycommand, opt_name, fd_pipes, env, gid, groups, uid, umask,
myargs = [opt_name]
myargs.extend(mycommand[1:])
+ # Quiet killing of subprocesses by SIGPIPE (see bug #309001).
+ signal.signal(signal.SIGPIPE, signal.SIG_DFL)
+
# Set up the command's pipes.
my_fds = {}
# To protect from cases where direct assignment could