From: Zac Medico Date: Thu, 22 Jun 2006 16:43:52 +0000 (-0000) Subject: Don't register signal handlers during module import because it may override signal... X-Git-Tag: v2.1.1~431 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d2a3933fad2bb49810be624d7b070d645ba946bd;p=portage.git Don't register signal handlers during module import because it may override signal hadlers that were registered by the calling code. svn path=/main/trunk/; revision=3606 --- diff --git a/pym/portage.py b/pym/portage.py index a1656e36f..d0cbf70de 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -127,19 +127,6 @@ except ImportError: # =========================================================================== -def exithandler(signum,frame): - """Handles ^C interrupts in a sane manner""" - signal.signal(signal.SIGINT, signal.SIG_IGN) - signal.signal(signal.SIGTERM, signal.SIG_IGN) - - # 0=send to *everybody* in process group - sys.exit(1) - -signal.signal(signal.SIGCHLD, signal.SIG_DFL) -signal.signal(signal.SIGINT, exithandler) -signal.signal(signal.SIGTERM, exithandler) -signal.signal(signal.SIGPIPE, signal.SIG_DFL) - def load_mod(name): modname = string.join(string.split(name,".")[:-1],".") mod = __import__(modname)