[Zope] Signals

Christian Theune ct@gocept.com
Wed, 31 Jul 2002 00:28:49 +0200


Hi.

* Chris McDonough <chrism@zope.com> [020730 15:50]:
> The current Zope head allows you to register an interest in a signal
> something like:
> 
> from SignalHandler import SignalHandler
> import signal
> SignalHandler.registerHander(signal.SIGHUP, mymethod)

Hmm. What I wonder about is: In which thread will the mymethod be
callen, and in which context ... the problem with this solution (this
came to my mind after posting my question) is the context of the
registered hook. This will be the main thread, isn't it?

We solved the problem in another way inbetween by rewriting the signal
handling procedure of pylog to use select() and popen() which won't be
affected by threading issues. (Also it didn't run on windows before, so
that's not a problem either.)

Thanks for the hint (although HEAD is not what we will be using in this
project ...)

Cheers
Christian

-- 
Christian Theune - ct@gocept.com
gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt
tel.+49 3641 511586 - fax.+49 3496 3099118 mob. - +49 179 7808366

reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])