GNOME Bugzilla – Bug 682014
Better SIGINT handling for python signals module
Last modified: 2012-10-12 06:34:37 UTC
Better SIGINT handling for python signals module Even though PyInitialize_Ex does not initialize signal handlers, the python signal module does install a handler for SIGINT when the handler for SIGINT is set to SIG_DFL on importing the signal module. To avoid applications not handling SIGINT we set a custom SIGINT handler (if the current SIGINT handler is SIG_DFL) before initializing the python interpreter. This signal handler when invoked simply chains to the default SIGINT handler.
Created attachment 221411 [details] [review] Better SIGINT handling for python signals module Even though PyInitialize_Ex does not initialize signal handlers, the python signal module does install a handler for SIGINT when the handler for SIGINT is set to SIG_DFL on importing the signal module. To avoid applications not handling SIGINT we set a custom SIGINT handler (if the current SIGINT handler is SIG_DFL) before initializing the python interpreter. This signal handler when invoked simply chains to the default SIGINT handler.