mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
make it possible to disable exit on SIGUSR1
This commit is contained in:
parent
68bce90754
commit
9803c90341
@ -99,7 +99,7 @@ def dump_info(signal=None, frame=None, file=sys.stdout, testing=False): # pragm
|
|||||||
|
|
||||||
print("****************************************************")
|
print("****************************************************")
|
||||||
|
|
||||||
if not testing:
|
if not testing and not os.getenv("MITMPROXY_DEBUG_STAY_ALIVE"): # pragma: no cover
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ def dump_stacks(signal=None, frame=None, file=sys.stdout, testing=False):
|
|||||||
if line:
|
if line:
|
||||||
code.append(" %s" % (line.strip()))
|
code.append(" %s" % (line.strip()))
|
||||||
print("\n".join(code), file=file)
|
print("\n".join(code), file=file)
|
||||||
if not testing: # pragma: no cover
|
if not testing and not os.getenv("MITMPROXY_DEBUG_STAY_ALIVE"): # pragma: no cover
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user