Advanced Search
Mail us
Home    Manuel    Links    Faq    Submit a tcl/tk Reference    Contact Us

    Some examples tcl/tk codes     Man of Bwidget     Man of blt     mkwidget screenshots     TkOgl     Video Demo real.

  trap signals, and other more Unix specific functions?
 Extended Tcl offers many of these types of functions.  For instance,
extended Tcl has the `signal` command:

        signal action siglist [command]

        where action is one of "default", "ignore", "error", "trap", "get",
        plus the POSIX "block" and "unblock" actions (available only on
        POSIX systems, of course).  Siglist is a list of either the symbolic
        or numeric Unix signal (the SIG prefix is optional).  Command is your
        error handler (or a simple {puts stdout "Don`t press *that* key!"}  :-)

"trap" does what you expect, and I find "error" and "get" to be
extremely useful in interactive programs which demand keyboard

Extended Tcl also has things like fork, etc.

Answer by (Brad Morrison).