Nick Craig-Wood wrote:

>   The only sensible things you can do from a signal handler is set a
>   global flag, or call sem_post on a semaphore, to record the delivery
>   of the signal. The remainder of the program can then either poll the
>   global flag, or use sem_wait() and sem_trywait() on the semaphore.

but that's exactly what Python's signal handlers do, right ?

(the interpreter uses a "pending call" queue to collect events, and 
executes them from the interpreter main loop in a controlled fashion).

</F>

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to