signal module released

Guido.van.Rossum@cwi.nl
Mon, 29 Aug 1994 12:37:31 +0200

A few people have asked for this or at least expressed interest, so
(since the release of 1.1 is still far away :-( ) I've put together a
set of patches and new files that together implement signals in
Python. Thanks for Lance Ellinghouse for starting the signal module,
and for debugging the patch set.

Here's the URL: ftp://ftp.cwi.nl/pub/python/signals.tar.gz.

I'm afraid no documentation exists yet -- however it should be fairly
simple -- e.g. to install a handler for SIGKILL:

from signal import *
.
.
.
def killed(signo, frame):
print 'Killed!!!'
...cleanup code...
sys.exit(1)
.
.
.
signal(SIGKILL, killed)

Interaction with threads is defined as follows: only the main thread
can catch signals. Doing it in any other way would make things even
more system dependent, as the interaction between threads and signals
is rather different for different systems...

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
<URL:http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>