On Nov 24, 2008, at 24:43 , Martin Casado wrote:
Hmm, Teemu thinks he's fixed that in our local branch which probably
doesn't do you much good atm.
You could always register a handler in C++ .... if you don't mind
a temporary hack you can just add it to src/nox_main.cc
.martin
On Nov 23, 2008, at 12:43 PM, Glen Gibb wrote:
I'm afraid that trying to use signal gives the following error:
ValueError: signal only works in main thread
Actually, this specific problem doesn't have a cure in our local
branch, but one can work around it using the reactor.callFromThread
call which executes a function within the reactor's thread. The
example below worked just fine on our local branch and it *should*
work with the noxrepo.org version too:
def sig_install():
def sig_handler(signal_num, handler):
lg.debug('HUP!')
import signal
signal.signal(signal.SIGHUP, sig_handler)
from twisted.internet import reactor
reactor.callFromThread(sig_install)
HTH,
Teemu
--
_______________________________________________
nox-dev mailing list
[email protected]
http://noxrepo.org/mailman/listinfo/nox-dev_noxrepo.org