Greg Wardwrites: > Signal handling raises all sorts of red flags with me, mainly because > people much smarter than me stay away from it, and I don't really > understand their reservations. Your patch looks about as safe as a > signal handler can, though. BTW, did you try os._exit() rather than > sys.exit()? sys.exit() involves raising a Python exception, which > undoubtedly involves allocating memory, which is a no-no for signal > handlers (malloc() is not reentrant on some systems). os._exit() is a > much shorter path to the real exit() system call. Um, a signal handler you set in Python doesn't run when the signal gets delivered, it runs when the Python event loop next runs. The C level signal handler just sets a flag saying "we've had a signal". Running Python code a signal delivery time sounds adventurous :) Cheers, M. -- I think my standards have lowered enough that now I think ``good design'' is when the page doesn't irritate the living fuck out of me. -- http://www.jwz.org/gruntle/design.html