In nonthreaded environments, you can mask or unmask signals using UNIX system calls.
In multithreaded environments, using versions of Open Client and Open Server earlier than 12.0, you could not change masking for threads used internally by Sybase libraries. Using version 12.0 or later of the Sybase libraries, however, two special signal handlers are available for masking or unmasking signals:
CS_SIGNAL_BLOCK – to mask a signal, install this signal handler using the Sybase-provided signal installation routine. When the signal occurs, it is held until you unmask it.
CS_SIGNAL_UNBLOCK – to unmask a signal, install this signal handler using the Sybase-provided signal installation routine.
Other special signal handlers for multithreaded environments include:
CS_SIGNAL_IGNORE – this signal handler ignores a signal. CS_SIGNAL_IGNORE works the same way as the UNIX special signal handler SIG_IGN.
CS_SIGNAL_DEFAULT – this signal handler takes a default action when a signal occurs. CS_SIGNAL_DEFAULT works the same way as the UNIX special signal handler SIG_DFL.