summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-10-14 14:59:33 -0700
committerZac Medico <zmedico@gentoo.org>2012-10-14 14:59:33 -0700
commit8a8eda21d80099e74f38f5456f542611238f44a1 (patch)
tree25cc0dce3f1ab9757c8131a9372ada0a82b912a2 /pym
parent916bf3fb28bb5266258a3e375520e4fdc0e62121 (diff)
downloadportage-8a8eda21d80099e74f38f5456f542611238f44a1.tar.gz
portage-8a8eda21d80099e74f38f5456f542611238f44a1.tar.bz2
portage-8a8eda21d80099e74f38f5456f542611238f44a1.zip
emerge: handle KeyboardInterrupt, not SIGINT
We handle KeyboardInterrupt instead of installing a SIGINT handler, since exiting from signal handlers intermittently causes python to ignore the SystemExit exception with a message like this: Exception SystemExit: 130 in <function remove at 0x7fd2146c1320> ignored
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/main.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index dad144c7d..adb6327c8 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -1955,11 +1955,10 @@ def emerge_main(args=None):
del oldargs
def emergeexitsig(signum, frame):
- signal.signal(signal.SIGINT, signal.SIG_IGN)
signal.signal(signal.SIGTERM, signal.SIG_IGN)
portage.util.writemsg("\n\nExiting on signal %(signal)s\n" % {"signal":signum})
sys.exit(128 + signum)
- signal.signal(signal.SIGINT, emergeexitsig)
+
signal.signal(signal.SIGTERM, emergeexitsig)
def emergeexit():