[Zope-Coders] Signal forwarding

Chris McDonough chrism@zope.com
09 Oct 2002 13:04:38 -0400


On Wed, 2002-10-09 at 12:20, Guido van Rossum wrote:
> > Yikes, but it's so useful. :-(  Packing is an administrative function
> > and admins can grok signals. They can't really grok setting up a shell
> > script to call "manage_pack", though.
> 
> Hm?  I thought packing was usually done via the ZMI?

It needs to be automated in most production sites.

> > Obviously it shouldn't block.  Would it be acceptable for it to kick off
> > a thread?
> 
> I don't know.  Can you (portably!) start a thread in a signal handler?

I dunno either, and I likely won't be able to spend the time to find out
before 2.6 comes out.  So, yeah, I guess it's probably not worth the
risk, and the feature should be removed.

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.

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

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.

- C