Implements a software signal facility.
Standard C Library (libc.a)
void (*ssignal (Signal, Action))( ) int Signal; void (*Action)( );
int gsignal (Signal) int Signal;
Attention: Do not use the ssignal or gsignal subroutine in a multithreaded environment.
The ssignal and gsignal subroutines implement a software facility similar to that of the signal and kill subroutines. However, there is no connection between the two facilities. User programs can use the ssignal and gsignal subroutines to handle exceptional processing within an application. The signal subroutine and related subroutines handle system-defined exceptions.
The software signals available are associated with integers in the range 1 through 16. Other values are reserved for use by the C library and should not be used.
The ssignal subroutine associates the procedure specified by the Action parameter with the software signal specified by the Signal parameter. The gsignal subroutine raises the Signal, causing the procedure specified by the Action parameter to be taken.
The Action parameter is either a pointer to a user-defined subroutine, or one of the constants SIG_DFL (default action) and SIG_IGN (ignore signal). The ssignal subroutine returns the procedure that was previously established for that signal. If no procedure was established before, or if the signal number is illegal, then the ssginal subroutine returns the value of SIG_DFL.
The gsignal subroutine raises the signal specified by the Signal parameter by doing the following:
|Signal||Specifies a signal.|
|Action||Specifies a procedure.|
These subroutines are part of Base Operating System (BOS) Runtime.
The kill or killpg subroutine, signal subroutine.