Python: Catch Ctrl-C command. Prompt “really want to quit (y/n)”, resume execution if no
The python signal handlers do not seem to be real signal handlers; that is they happen after the fact, in the normal flow and after the C handler has already returned. Thus you’d try to put your quit logic within the signal handler. As the signal handler runs in the main thread, it will block … Read more