add an option to not print stack traces on ctrl+c.

This commit is contained in:
AUTOMATIC1111
2023-10-15 08:45:38 +03:00
parent d4255506ff
commit 0d65d0eabd
2 changed files with 6 additions and 1 deletions

View File

@@ -150,10 +150,14 @@ def dumpstacks():
def configure_sigint_handler():
# make the program just exit at ctrl+c without waiting for anything
from modules import shared
def sigint_handler(sig, frame):
print(f'Interrupted with signal {sig} in {frame}')
dumpstacks()
if shared.opts.dump_stacks_on_signal:
dumpstacks()
os._exit(0)