"Fossies" - the Fresh Open Source Software Archive
Member "SAOImageDS9/tclsignal/doc/sig.announce.1.4" (13 Nov 2019, 2144 Bytes) of package /linux/misc/ds9.8.1.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard
) with prefixed line numbers.
Alternatively you can here view
the uninterpreted source code file.
1 Signal Extension (package Signal) Version 18.104.22.168 available
3 See all my Tcl extensions at http://www.du.edu/~mschwart/tcl-tk.html
6 This extension adds dynamically loadable signal handling to Tcl/Tk scripts.
7 It provides a very limited subset of the functionality of tclX (just the
8 signal part, and about 3/4 of the functions for signals), but as a result
9 is quite small and quick to load.
11 Version 1.4 removes dependencies on Tk.
12 Tilman Kranz (firstname.lastname@example.org) patched this for wider portability on Linux
14 A summary of the extension usage follows:
18 signal add signo proc [-async]
20 Adds a signal handler for signal signo through proc proc.
22 Signals can be provided by number, or the most common ones are provided by
23 name (e.g., SIGHUP).
25 The proc is any Tcl procedure, and it is evaluated when the signal comes in.
26 It will be provided no arguments.
28 Signal handlers have Posix semantics--they persist until reset.
30 If -async is used, the signal handler is created using Tcl_AsyncCreate().
31 Checks for the signal are very frequent (each evaluation) using this
32 technique, but one doesn't know quite where evaluation is or how to handle
33 errors in this situation. The code will evaluate the provided procedure in
34 the current interpreter if available, and in the interpreter which added the
35 signal handler otherwise. At least until a better scheme is suggested.
37 The -async is especially useful to interrupt "runaway" procs, or to cause a
38 quick exit; the default mechanism simply waits for another MainLoop cycle.
40 signal delete signo
42 Restores handling of signal signo to the default (SIG_DFL).
44 signal print
46 Prints the handling of all signals with handlers.
48 Formatted as signal ----> procedure
49 or as signal !---> procedure
50 if the signal is handled asynchronously
52 signal print signo
54 Prints the procedure for handling signal signo.
56 Prints the word UNHANDLED if no signal handler is active for that signal.
58 signal version
60 Returns the string representing the current version of the package