Signal handlers inherited from the parent process are irrelevant here.
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+import signal
import traceback
import portage
portage.process._setup_pipes(fd_pipes)
+ # Use default signal handlers since the ones inherited
+ # from the parent process are irrelevant here.
+ signal.signal(signal.SIGINT, signal.SIG_DFL)
+ signal.signal(signal.SIGTERM, signal.SIG_DFL)
+
portage.output.havecolor = self.dblink.settings.get('NOCOLOR') \
not in ('yes', 'true')