home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tclX-6.4 / help / signals / signal < prev   
Encoding:
Text File  |  1992-12-17  |  3.0 KB  |  61 lines

  1.  
  2.  
  3.           signal action siglist [command]
  4.                Specify the action to take when a Unix signal is
  5.                received by Extended Tcl, or a program that embeds it.
  6.                Siglist is a list of either the symbolic or numeric
  7.                Unix signal (the SIG prefix is optional).  Action is
  8.                one of the following actions to be performed on receipt
  9.                of the signal.
  10.  
  11.                default - Perform system default action when signal is
  12.                received (see signal system call documentation).
  13.  
  14.                ignore - Ignore the signal.
  15.  
  16.                error - Generate a catchable Tcl error.  It will be as
  17.                if the command that was running returned an error.  The
  18.                error code will be in the form:
  19.                    UNIX SIG signame
  20.                For the death of child signal, signame will always be
  21.                SIGCHLD, rather than SIGCLD, to allow writing portable
  22.                code.
  23.  
  24.                trap - When the signal occures, execute command and
  25.                continue execution if an error is not returned by
  26.                command.  If will be executed in the global context and
  27.                the symbolic signal name (e.g. SIGINT) will be supplied
  28.                in a global variable signalReceived.  If an error is
  29.                returned, then follow the standard Tcl error mechanism.
  30.                Often command will just do an exit.
  31.  
  32.                get - Retrieve the current settings of the specified
  33.                signals.  A keyed list will be returned were the keys
  34.                are one of the specified signals and the values are a
  35.                list cosisting of the action associated with the
  36.                signal, a 0 if the signal may be delivered (not block)
  37.                and a 1 if it is blocked. The actions maybe one of
  38.                `default',`ignore', `error' or `trap.  If the action is
  39.                trap, the third element is the command associated with
  40.                the action.
  41.  
  42.                block - Block the specified signals from being
  43.                received. (Posix systems only).
  44.  
  45.                unblock - Allow the specified signal to be received.
  46.                Pending signals will not occur. (Posix systems only).
  47.  
  48.                The signal action will remain enabled after the
  49.                specified signal has occurred.  The exception to this
  50.                is SIGCHLD on systems without Posix signals.  For these
  51.                systems, SIGCHLD is not be automatically reenabled.
  52.                After a SIGCHLD signal is received, a call to wait must
  53.                be performed to retrieve the exit status of the child
  54.                process before issuing another signal SIGCHLD ...
  55.                command.  For code that is to be portable between both
  56.                types of systems, use this approach.
  57.  
  58.                Signals are not processed until after the completion of
  59.                the Tcl command that is executing when the signal is
  60.                received.
  61.