1 |
commit: c04225dddbe83ba371258ffdc4be7842ab672fff |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Feb 1 04:42:46 2011 +0000 |
4 |
Commit: Thomas Sachau <tommy <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Feb 1 04:42:46 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c04225dd |
7 |
|
8 |
_MergeProcess: use default SIGINT/TERM handlers |
9 |
|
10 |
Signal handlers inherited from the parent process are irrelevant here. |
11 |
|
12 |
--- |
13 |
pym/portage/dbapi/_MergeProcess.py | 8 +++++++- |
14 |
1 files changed, 7 insertions(+), 1 deletions(-) |
15 |
|
16 |
diff --git a/pym/portage/dbapi/_MergeProcess.py b/pym/portage/dbapi/_MergeProcess.py |
17 |
index 3cf50d2..f717d12 100644 |
18 |
--- a/pym/portage/dbapi/_MergeProcess.py |
19 |
+++ b/pym/portage/dbapi/_MergeProcess.py |
20 |
@@ -1,6 +1,7 @@ |
21 |
-# Copyright 2010 Gentoo Foundation |
22 |
+# Copyright 2010-2011 Gentoo Foundation |
23 |
# Distributed under the terms of the GNU General Public License v2 |
24 |
|
25 |
+import signal |
26 |
import traceback |
27 |
|
28 |
import portage |
29 |
@@ -29,6 +30,11 @@ class MergeProcess(SpawnProcess): |
30 |
|
31 |
portage.process._setup_pipes(fd_pipes) |
32 |
|
33 |
+ # Use default signal handlers since the ones inherited |
34 |
+ # from the parent process are irrelevant here. |
35 |
+ signal.signal(signal.SIGINT, signal.SIG_DFL) |
36 |
+ signal.signal(signal.SIGTERM, signal.SIG_DFL) |
37 |
+ |
38 |
portage.output.havecolor = self.dblink.settings.get('NOCOLOR') \ |
39 |
not in ('yes', 'true') |