From: Zac Medico Date: Tue, 23 Dec 2008 23:48:14 +0000 (-0000) Subject: Add SIGUSR1 signal handlers that call pdb.set_trace(). Thanks to Brian Harring for X-Git-Tag: v2.2_rc19~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=69e2e5d5a458876cbccb6e6f479d41eaa55cf544;p=portage.git Add SIGUSR1 signal handlers that call pdb.set_trace(). Thanks to Brian Harring for the suggestion. svn path=/main/trunk/; revision=12292 --- 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: