[Zope-Coders] Signal forwarding

Guido van Rossum guido@python.org
Wed, 09 Oct 2002 13:07:33 -0400


> This might be a use case for ditching complicated signal handlers
> entirely and moving to some sort of simple socket server for
> administrative functions.  We could still have signal handlers on a
> process if we wanted, but the signal handlers could just write something
> to the socket.

Yes, please!  Jeremy & I found at least one case where an attempt to
close a storage from a signal handler could conceivably try to acquire
a lock (when aborting a current transaction).

Ideally, signal handlers should do nothing more than set a global
flag.  Writing to an already open socket would be OK.

> This might also make administrative functions slightly more uniform
> between UNIX and Windows.

Yes!

> One problem is controlling security.  On UNIX, we'd want to use a UNIX
> domain socket protected in such a way that only certain folks could send
> commands to it.  On Windows, we'd probably just punt and open up a TCP
> socket that could only be connected to via localhost.

Right.  That's pretty simple.

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