From: Zac Medico Date: Thu, 25 Dec 2008 01:23:32 +0000 (-0000) Subject: Add SIGUSR1 signal handlers that call pdb.set_trace(). Thanks to Brian Harring for X-Git-Tag: v2.1.6.3~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2767e4c5fb68205854c8b4d855987a305b89936a;p=portage.git Add SIGUSR1 signal handlers that call pdb.set_trace(). Thanks to Brian Harring for the suggestion. (trunk r12292) svn path=/main/branches/2.1.6/; revision=12321 --- diff --git a/bin/ebuild b/bin/ebuild index a38d189a9..33326d63e 100755 --- a/bin/ebuild +++ b/bin/ebuild @@ -19,6 +19,11 @@ try: except KeyboardInterrupt: sys.exit(1) +def debug_signal(signum, frame): + import pdb + pdb.set_trace() +signal.signal(signal.SIGUSR1, debug_signal) + import optparse import os diff --git a/bin/emerge b/bin/emerge index 40e3b19f0..b07ad9e0e 100755 --- a/bin/emerge +++ b/bin/emerge @@ -20,6 +20,11 @@ try: except KeyboardInterrupt: sys.exit(1) +def debug_signal(signum, frame): + import pdb + pdb.set_trace() +signal.signal(signal.SIGUSR1, debug_signal) + try: import _emerge except ImportError: