Re: Signal problem

2008-03-27 Thread Jeffrey Froman
Fabio Durieux Lopes wrote: > def signalHandler(signum, frame): > terminate = True This creates a new variable named "terminate" inside the signalHandler function's local scope. To adjust the value of a module-level global from inside a function, use the "global" keyword: def signalHandl

Re: Signal problem

2008-03-27 Thread Gabriel Genellina
En Thu, 27 Mar 2008 16:27:16 -0300, Fabio Durieux Lopes <[EMAIL PROTECTED]> escribió: >On daemon.py I have: > > terminate = False > > def signalHandler(signum, frame): >terminate = True > >And my main loop goes like this: > >'while(not daemon.terminate):' > >When the signal t