[Zope-Coders] Signal forwarding

Guido van Rossum guido@python.org
Thu, 10 Oct 2002 11:14:11 -0400


> FWIW, I just want to make sure that I don't need to remove the current
> shutdown signal hander for 2.6.
> 
> I definitely see that the current pack handler needs to go.  But
> hopeless or not, the shutdown handler currently works.

Try to do the minimal amount of work in the handler.  I see no need to
close sockets -- process exit will close them just fine.  The only
thing you apparently need to do is close the storage because
FileStorage writes the new index to disk when closed.  (Though if the
storage is ZEO, closing the ClientStorage in Zope is unnecessary.)

> I can see that it might be disastrous under ZEO as all work happens
> in the main thread, but under Zope it seems hamrless.

I have to review the signal handlers in the ZEO storage server.  They
are different (ZEO uses SIGINT instead of SIGHUP to ask for a restart)
and I fear that the funny business with writing *two* pids to the
pidfile also doesn't work as intended (not that I understand how it
was intended).

--Guido van Rossum (home page: http://www.python.org/~guido/)