Add SIGUSR1 signal handlers that call pdb.set_trace(). Thanks to Brian Harring for
authorZac Medico <zmedico@gentoo.org>
Tue, 23 Dec 2008 23:48:14 +0000 (23:48 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 23 Dec 2008 23:48:14 +0000 (23:48 -0000)
the suggestion.

svn path=/main/trunk/; revision=12292

bin/ebuild
bin/emerge

index a38d189a970c75d42b8138e6cc1ae2503e4cb632..33326d63e824300b8c3ea8f5fb61e1eda35c517a 100755 (executable)
@@ -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
 
index 40e3b19f03f940e64f11037862f7db91c7aca47e..b07ad9e0e4d6587ed10dfb856c4cc76c7d735c96 100755 (executable)
@@ -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: