Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /usr/doc/slang-1.4.5/html/ drwxr-xr-x | |
| Viewing file: Select action/file-type: 6. Signal Functions
Almost all non-trivial programs must worry about signals. This is especially true for programs that use the S-Lang terminal input/output and screen management routines. Unfortunately, there is no fixed way to handle signals; otherwise, the Unix kernel would take care of all issues regarding signals and the application programmer would never have to worry about them. For this reason, none of the routines in the S-Lang library catch signals; however, some of the routines block the delivery of signals during crucial moments. It is up to the application programmer to install handlers for the various signals of interest. For the interpreter, the most important signal to worry about is
Applications that use the
It is important that handlers be established for these signals while
the either the SLsmg routines or the getkey routines are
initialized. The SLang_init_tty, SLang_reset_tty,
SLsmg_init_smg, and SLsmg_reset_smg functions block these
signals from occuring while they are being called.
Since a signal can be delivered at any time, it is important for the
signal handler to call only functions that can be called from a
signal handler. This usually means that such function must be
re-entrant. In particular, the The S-Lang library provides two functions for blocking and unblocking the above signals:
It should be noted that for every call to SLsig_block_signals, a
corresponding call should be made to SLsig_unblock_signals, e.g.,
See demo/pager.c for examples.
Next Previous Contents |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0308 ]-- |