[Zope-Coders] Daemon signal passing race condition

Toby Dickenson tdickenson@geminidataloggers.com
Fri, 11 Oct 2002 12:02:45 +0100


It still looks like there is a problem with the daemon process forwarding=
=20
signals. There is a small window in between forking a new child process a=
nd=20
registering a new signal handler.... If the daemon process receives SIGTE=
RM=20
inside this window then it will forward SIGTERM to the recently deceased=20
child pid (not the newly forked one), then exit itself. This leaves an=20
orphaned child process.

I think the right solution is to mask the interesting signals during the=20
refork. Unfortunately sigprocmask and friends are not exposed by the pyth=
on=20
standard library.

Any suggestions?