[Python-Dev] Removing PID check from signal handler (original) (raw)
Steve Dower steve.dower at python.org
Fri Apr 12 14:05:03 EDT 2019
- Previous message (by thread): [Python-Dev] Removing PID check from signal handler
- Next message (by thread): [Python-Dev] Removing PID check from signal handler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 12Apr.2019 0919, Jeroen Demeyer wrote:
The signal handler (that receives signals from the OS) in Python starts with a check
if (getpid() == mainpid) 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 https://bugs.python.org/issue36601 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.
Cheers, Steve
- Previous message (by thread): [Python-Dev] Removing PID check from signal handler
- Next message (by thread): [Python-Dev] Removing PID check from signal handler
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]