Add a SIGUSR1 handler to trigger pdb.set_trace().
authorZac Medico <zmedico@gentoo.org>
Sat, 14 Aug 2010 02:00:44 +0000 (19:00 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 14 Aug 2010 02:00:44 +0000 (19:00 -0700)
bin/ebuild-ipc.py

index 0d673701acad9602a0417b56af1d94983ff3f1bf..d0c17d037bdc2c48961fabde040ad1c84ea6048e 100755 (executable)
@@ -8,8 +8,14 @@
 import os
 import pickle
 import select
+import signal
 import sys
 
+def debug_signal(signum, frame):
+       import pdb
+       pdb.set_trace()
+signal.signal(signal.SIGUSR1, debug_signal)
+
 # Avoid sandbox violations after python upgrade.
 pym_path = os.path.join(os.path.dirname(
        os.path.dirname(os.path.realpath(__file__))), "pym")