[Python-Dev] Removing PID check from signal handler
On 12Apr.2019 0919, Jeroen Demeyer wrote:
> The signal handler (that receives signals from the OS) in Python starts
> with a check
> ??? if (getpid() == main_pid)
> Looking at the comments, the intent was to do a check for the main
> *thread* but this is checking the *process* id. So this condition is
> basically always true. Therefore, I suggest to remove it in
> If you have any objections or comments, I suggest to post them to that bpo.
To add a little more context, the check was added about 25 years ago as
a "hack" for some reason that we can't figure out anymore.
So if you are a historian of ancient operating systems and know of one
that might have raised signal handlers in a different process from the
one where it was registered, we'd love to hear from you.