##// END OF EJS Templates
docs: fix broken `make` in `docs/`...
docs: fix broken `make` in `docs/` We had some wrapped lines without blank lines between, which made the runrst script think the list was not a list and it got confused about the indentation. I added blank lines, and also some other minor styling for consistency with the rest of the file.

File last commit:

r49730:6000f5b2 default
r52269:0f3a091d default
Show More
showstack.py
30 lines | 679 B | text/x-python | PythonLexer
# showstack.py - extension to dump a Python stack trace on signal
#
# binds to both SIGQUIT (Ctrl-\) and SIGINFO (Ctrl-T on BSDs)
r"""dump stack trace when receiving SIGQUIT (Ctrl-\) or SIGINFO (Ctrl-T on BSDs)
"""
import signal
import sys
import traceback
def sigshow(*args):
sys.stderr.write("\n")
traceback.print_stack(args[1], limit=10, file=sys.stderr)
sys.stderr.write("----\n")
def sigexit(*args):
sigshow(*args)
print('alarm!')
sys.exit(1)
def extsetup(ui):
signal.signal(signal.SIGQUIT, sigshow)
signal.signal(signal.SIGALRM, sigexit)
try:
signal.signal(signal.SIGINFO, sigshow)
except AttributeError:
pass