From 61f3c3cff4f014db2aacfb13f3b511f7c633d6f4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 23 Dec 2008 22:43:28 +0000 Subject: Move initial signal handlers to the launcher script. svn path=/main/trunk/; revision=12290 --- pym/_emerge/__init__.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'pym/_emerge/__init__.py') diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index acca12ace..31e669aae 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -3,23 +3,6 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: emerge 5976 2007-02-17 09:14:53Z genone $ -import sys -# This block ensures that ^C interrupts are handled quietly. -try: - import signal - - def exithandler(signum,frame): - signal.signal(signal.SIGINT, signal.SIG_IGN) - signal.signal(signal.SIGTERM, signal.SIG_IGN) - sys.exit(1) - - signal.signal(signal.SIGINT, exithandler) - signal.signal(signal.SIGTERM, exithandler) - signal.signal(signal.SIGPIPE, signal.SIG_DFL) - -except KeyboardInterrupt: - sys.exit(1) - import array from collections import deque import fcntl @@ -28,6 +11,8 @@ import logging import select import shlex import shutil +import signal +import sys import textwrap import urlparse import weakref -- cgit v1.2.3-1-g7c22