summaryrefslogtreecommitdiffstats
path: root/pym/portage/dbapi/_MergeProcess.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-01-31 20:42:46 -0800
committerZac Medico <zmedico@gentoo.org>2011-01-31 20:42:46 -0800
commitc04225dddbe83ba371258ffdc4be7842ab672fff (patch)
tree50fdb1126e6a9b580b2be704c80c2a9244c3924c /pym/portage/dbapi/_MergeProcess.py
parent23cc6611c8b5303ec2ecf8cb8203e69ddb825551 (diff)
downloadportage-c04225dddbe83ba371258ffdc4be7842ab672fff.tar.gz
portage-c04225dddbe83ba371258ffdc4be7842ab672fff.tar.bz2
portage-c04225dddbe83ba371258ffdc4be7842ab672fff.zip
_MergeProcess: use default SIGINT/TERM handlers
Signal handlers inherited from the parent process are irrelevant here.
Diffstat (limited to 'pym/portage/dbapi/_MergeProcess.py')
-rw-r--r--pym/portage/dbapi/_MergeProcess.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py
index 3cf50d22b..f717d12df 100644
--- a/pym/portage/dbapi/_MergeProcess.py
+++ b/pym/portage/dbapi/_MergeProcess.py
@@ -1,6 +1,7 @@
-# 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
@@ -29,6 +30,11 @@ class MergeProcess(SpawnProcess):
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')