Signal exceptions are special events sent to a thread when the user presses certain key sequences or when another thread or process explicitly initiates the exception. There are three types of signal exceptions:
XCPT_SIGNAL_BREAK
Signal exceptions are sent only to Thread 1 (the main thread) in the process receiving the exception. If an exception handler is registered on Thread 1, it must be prepared to receive signal exceptions. The thread 1 exception handler can always ignore the signal exception by returning XCPT_CONTINUE_SEARCH.
If the thread 1 exception handler is to receive signal exceptions, it must use DosSetSignalExceptionFocus to notify OS/2 that it wants to receive the XCPT_SIGNAL_INTR (Ctrl+C) and XCPT_SIGNAL_BREAK (Ctrl+Break) signals. Otherwise, these exceptions are not passed to the exception handler and the default action-to terminate the process-is taken by OS/2. The thread will get XCPT_SIGNAL_KILLPROC signals whether it uses DosSetSignalExceptionFocus or not.
All three of these signals are delivered by a single exception-XCPT_SIGNAL-and the exception handler for Thread 1 can choose to handle none, some, or all of the signals. The signal being sent can be determined by examining the exception information in EXCEPTIONREPORTRECORD.
The following table provides information about each type of signal.
Signal Exceptions
ÚÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³Signal ³Symbolic Constant ³Description ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³Ctrl+Break ³XCPT_SIGNAL_BREAK ³This exception is sent to ³ ³ ³ ³Thread 1 in the current ³ ³ ³ ³keyboard-focus process when³ ³ ³ ³a Ctrl+Break key sequence ³ ³ ³ ³is received from the ³ ³ ³ ³keyboard. The default ³ ³ ³ ³action taken by OS/2 for ³ ³ ³ ³this exception is forced ³ ³ ³ ³process termination. ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³Ctrl+C ³XCPT_SIGNAL_INTR ³This exception is sent to ³ ³ ³ ³Thread 1 in the current ³ ³ ³ ³keyboard-focus process when³ ³ ³ ³a Ctrl+C key sequence is ³ ³ ³ ³received from the keyboard.³ ³ ³ ³The default action taken by³ ³ ³ ³OS/2 for this exception is ³ ³ ³ ³forced process termination.³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ ³Kill Process³XCPT_SIGNAL_KILLPROC ³This exception is sent to ³ ³Signal ³ ³Thread 1 in the process ³ ³ ³ ³specified when an ³ ³ ³ ³application uses ³ ³ ³ ³DosKillProcess. The ³ ³ ³ ³XCPT_SIGNAL_KILLPROC signal³ ³ ³ ³exception results from an ³ ³ ³ ³action external to the ³ ³ ³ ³process. The default action³ ³ ³ ³taken by OS/2 for this ³ ³ ³ ³exception is forced process³ ³ ³ ³termination. ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ