A thread+signal problem: the parent process sets the handler for SIGALRM and then starts a child thread. The child thread schedules and alarm call. This should make the child thread receive a SIGALRM signal, handled by the handler set by the parent process, right? Well... practice proved me wrong and I don't know why.
Actually, here is the code I've tested this whole thing with:
--- code ---
from signal import *
from thread import *
from time import *
print 'Alarm raised, exiting'
print 'Child started'
print 'Child: alarm set, will exit on signal'
print 'Child: tick'
print 'Parent started'
print 'Parent: spawned child, sleeping'
--- end code ---
This child should of course exit after 2 ticks but, surprisingly, it keeps going until the parent exits because the child never receives the SIGALRM signal.
Any ideas what is happening here, anyone?