Tcl/Tk Extensions for Unix/Posix

Signal Extension (package Signal)

This extension adds dynamically loadable signal handling to Tcl/Tk scripts.

A configure script / autoconf is added, though only tested on a few kinds of Unix so far.

Version 1.4.0.1 configuration was patched for Linux portability (and others) by: Tilman Kranz-tilde@tk-sls.de

To ensure that signal handling does not happen at unsafe times (the X library is still non-reentrant), and only occurs in the X loop, the signal handler writes the signal number on a pipe, which is handled through the Tcl file notification mechanism. Just like you'd want in X.

If you can't wait that long, but want to wait until sometime -relatively- safe, use the -async flag to create the handler (new in version 1.2). Of course, the secretary will disavow all knowledge...

Usages:

signal add signo proc [-async]

signal delete signo

signal print

signal print signo

Compressed tar file for signal extension version 1.4 (22199)

Sample test code for catching interrupts and popping up the window upon signal 21
Sample test code for catching interrupts asynchronously, including breaking out of a calculation.