Signals

The Interix Software Development Kit (SDK) supports only one set of signal semantics: the POSIX.1 set. It supports several different sets of signal-handling application programming interfaces (APIs), however. These are as follows:

The following important information applies when you are using signals with the Interix SDK:

The POSIX.1 committee introduced their new signal semantics because of problems with traditional signal implementations found on BSD and System V systems. When the System V3 signal() catches a signal, the action associated with the signal is reset to the default. In 4.3 BSD, it is not reset. In the International Standards Organization/American Standards Institute (ISO/ANSI) C standard, the signal() function either resets the default or does an implementation-defined blocking of the signal. The POSIX sigaction() call does not reset the default if the handler returns normally. The Interix SDK follows the POSIX signal semantics.

Because an Interix SDK process has a signal mask, it can block certain signals from arriving, except for SIGKILL or SIGQUIT. A process starts with a signal mask inherited from its parent. If any signals are generated and then blocked by the signal mask, they go into the set of pending signals.

If you are using the signal() API, the signal is still masked and remains masked until the mask is cleared. This can be a significant problem if your code does a longjmp() from the handler. Using sigaction() directly and siglongjmp() will correct some of those unexpected behaviors.

This section covers: