Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANNOUNCE] Signal Extension Version 1.2.0.0 available

5 views
Skip to first unread message

Michael I. Schwartz

unread,
Nov 14, 1996, 3:00:00 AM11/14/96
to

Signal Extension (package Signal) Version 1.2.0.0 available

http://www.nyx.net/~mschwart/signal_ext.html

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

Version 1.2 adds a trial OSF makefile added (thanks to Andre Gosselin)
as well as a -async option on the signal handlers to use the
Tcl_AsyncCreate() mechanism, with resulting improvement in response time.

Thanks to all who critiqued the approach used in version 1.0.

A summary of the extension usage follows:

Usages:

signal add signo proc [-async]

Adds a signal handler for signal signo through proc proc.

Signals can be provided by number, or the most common ones are provided by
name (e.g., SIGHUP).

The proc is a Tcl procedure, which is evaluated when the signal comes in.
It will be provided no arguments.

Signal handlers have Posix semantics--they persist until reset.

If -async is used, the signal handler is created using Tcl_AsyncCreate().
Checks for the signal are very frequent (each evaluation) using this
technique, but one doesn't know quite where evaluation is or how to handle
errors in this situation. The code will evaluate the provided procedure in
the current interpreter if available, and in the interpreter which added
the signal handler otherwise. At least until a better scheme is suggested.

The -async is especially useful to interrupt "runaway" procs, or to cause a
quick exit; the default mechanism simply waits for another MainLoop cycle.

signal delete signo

Restores handling of signal signo to the default (SIG_DFL).

signal print

Prints the handling of all signals with handlers.

Formatted as signal ----> procedure
or as signal !---> procedure
if the signal is handled asynchronously

signal print signo

Prints the procedure for handling signal signo.

Prints the word UNHANDLED if no signal handler is active for that signal.

0 new messages