
Michael Hudson mwh@python.net writes:
I'm not sure what to do about this: We apparently *want* the signals blocked in the thread, but we don't want them to be blocked in the process invoked through system(). Proposals are welcome.
Does pthread_atfork() help?
Most likely. system(3) is specified as being implemented through fork()/exec(), so an atfork handler should be invoked in any compliant implementation. We could install a child handler, which unblocks the signals we don't want to be blocked.
Now, the question is: What signals precisely we don't want to be blocked? I think the answer is "All signals that have not explicitly been blocked by the application".
OTOH, we already have PyOS_AfterFork, which could be used instead of pthread_atfork. Jeff, would you like to add some code there, to set all signal handlers into default for which Handlers lists that the default handling should occur?
Regards, Martin