From: Zac Medico Date: Sat, 14 Aug 2010 02:00:44 +0000 (-0700) Subject: Add a SIGUSR1 handler to trigger pdb.set_trace(). X-Git-Tag: v2.2_rc68~233 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3146e53630438473ad241939a5dfa2b71e9cf559;p=portage.git Add a SIGUSR1 handler to trigger pdb.set_trace(). --- 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")