I have a multi-threaded program and use signal.signal (SIGINT, func) to kill all threads when I press ctrl c. I have a question:
I need to call signal.signal (...) from main in python. Should I call it in a loop, or can I just set it once and whenever the user press ctrl c, will the signal be caught?
source share