summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-13 19:00:44 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-13 19:00:44 -0700
commit3146e53630438473ad241939a5dfa2b71e9cf559 (patch)
tree6439b7a0f2977001616b375d3b0813df6f164594
parent6ec700e140ac8679907032af18df831677c421c9 (diff)
downloadportage-3146e53630438473ad241939a5dfa2b71e9cf559.tar.gz
portage-3146e53630438473ad241939a5dfa2b71e9cf559.tar.bz2
portage-3146e53630438473ad241939a5dfa2b71e9cf559.zip
Add a SIGUSR1 handler to trigger pdb.set_trace().
-rwxr-xr-xbin/ebuild-ipc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/ebuild-ipc.py b/bin/ebuild-ipc.py
index 0d673701a..d0c17d037 100755
--- a/bin/ebuild-ipc.py
+++ b/bin/ebuild-ipc.py
@@ -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")