Martin Panter added the comment:

I think I figured out the problem. The signal module has a “main_pid” variable 
which it checks inside the low-level handler: 
<https://hg.python.org/cpython/file/v3.5.1/Modules/signalmodule.c#l300>. It 
looks like main_pid gets updated inside PyOS_AfterFork(), but I guess there is 
a race with a signal being received before main_pid is updated.

Maybe there should be some signal masking/blocking or something in the critical 
section between fork() and PyOS_AfterFork()?

----------
versions:  -Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25666>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to