I'm dealing with a python-written server that locks up, and stops working, including logging. I wonder if there's a python equivalent to java's "kill -3" signal that at least prints the current stacktrace.
+1
A:
import signal, traceback
def quit_handler(signum,frame):
traceback.print_stack()
signal.signal(signal.SIGQUIT,quit_handler)
gnibbler
2010-01-29 21:32:33
If the server "locks up", it doesn't necessarily get a SIGQUIT signal, I guess.
AndiDog
2010-01-29 21:35:18