From 2767e4c5fb68205854c8b4d855987a305b89936a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 25 Dec 2008 01:23:32 +0000 Subject: [PATCH] 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 --- bin/ebuild | 5 +++++ bin/emerge | 5 +++++ 2 files changed, 10 insertions(+) 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: -- 2.26.2