##// END OF EJS Templates
packaging: fix "make centos{5,6,7}"...
packaging: fix "make centos{5,6,7}" Without this change, make centos{5,6,7} fails with error: cp: cannot stat '<basedir>/rpmbuild/RPMS/*/*': No such file or directory This change is the exact equivalent of bc4bbc42899a (which applied to Fedora).

File last commit:

r40072:acf5dbe3 default
r40185:9b0cdfb3 default
Show More
showstack.py
28 lines | 731 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)
"""dump stack trace when receiving SIGQUIT (Ctrl-\) and SIGINFO (Ctrl-T on BSDs)
"""
from __future__ import absolute_import, print_function
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