diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-12-25 01:22:57 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-12-25 01:22:57 +0000 |
commit | a0ed8a348a2a8df148a5d9a17105d10eb4f012dc (patch) | |
tree | 5073996bd125c38b4a9998509db6d758965170f4 /pym/_emerge/__init__.py | |
parent | 1260b8b37a655e34a8300419f798881c7b2064e6 (diff) | |
download | portage-a0ed8a348a2a8df148a5d9a17105d10eb4f012dc.tar.gz portage-a0ed8a348a2a8df148a5d9a17105d10eb4f012dc.tar.bz2 portage-a0ed8a348a2a8df148a5d9a17105d10eb4f012dc.zip |
Move initial signal handlers to the launcher script. (trunk r12290)
svn path=/main/branches/2.1.6/; revision=12319
Diffstat (limited to 'pym/_emerge/__init__.py')
-rw-r--r-- | pym/_emerge/__init__.py | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 56842fba5..b5b248694 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 |