From: Zac Medico Date: Sat, 13 Mar 2010 06:47:36 +0000 (-0000) Subject: Bug #309001 - Install a SIGPIPE handler inside _exec for all forked processes. X-Git-Tag: v2.2_rc68~714 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d80db256ec34b8aac65eda89f2ff2baea5996d5f;p=portage.git Bug #309001 - Install a SIGPIPE handler inside _exec for all forked processes. svn path=/main/trunk/; revision=15825 --- 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