Signal handlers for asynchronous signals

Hi,

I was trying to make some modification to python source according to my needs, I would like to know where exactly the signal handlers are installed in CPython source on interpreter startup. I want to know particularly the locations where asynchronous signals handlers are set for python process initially. Any help would be appreciated.

thank you.

specifically I would like to know where is the signal handler for SIGTERM installed on startup.

The interpreter doesn’t install a SIGTERM handler at startup. It installs a SIGINT handler, but only if the current handler is SIG_DFL.

thank you Eryk.