SSIGNAL(3C) UNIX Programmer's Manual SSIGNAL(3C) NAME ssignal, gsignal - software signals SYNOPSIS #include int (*ssignal (sig, action))( ) int sig, (*action)( ); int gsignal (sig) int sig; HP-UX COMPATIBILITY Level: HP-UX/STANDARD Origin: System III Remarks: _S_s_i_g_n_a_l and _g_s_i_g_n_a_l are implemented on the Series 200 only. DESCRIPTION _S_s_i_g_n_a_l and _g_s_i_g_n_a_l implement a software facility similar to _s_i_g_n_a_l(2). This facility is used by the Standard C Library to enable the user to indicate the disposition of error con- ditions, and is also made available to the user for his own purposes. Software signals made available to users are associated with integers in the inclusive range 1 through 15. An _a_c_t_i_o_n for a software signal is _e_s_t_a_b_l_i_s_h_e_d by a call to _s_s_i_g_n_a_l, and a software signal is _r_a_i_s_e_d by a call to _g_s_i_g_n_a_l. Raising a software signal causes the action established for that sig- nal to be _t_a_k_e_n. The first argument to _s_s_i_g_n_a_l is a number identifying the type of signal for which an action is to be established. The second argument defines the action; it is either the name of a (user defined) _a_c_t_i_o_n _f_u_n_c_t_i_o_n or one of the manifest con- stants SIG_DFL (default) or SIG_IGN (ignore). _S_s_i_g_n_a_l returns the action previously established for that signal type. If no action has been established or the signal number is illegal, _s_s_i_g_n_a_l returns SIG_DFL. _G_s_i_g_n_a_l raises the signal identified by its argument, _s_i_g: If an action function has been established for _s_i_g, then that action is reset to SIG_DFL and the action function is entered with argument _s_i_g. _G_s_i_g_n_a_l returns the value returned to it by the action function. If the action for _s_i_g is SIG_IGN, _g_s_i_g_n_a_l returns the value 1 and takes no other action. If the action for _s_i_g is SIG_DFL, _g_s_i_g_n_a_l returns the value 0 and takes no other action. If _s_i_g has an illegal value or no action was ever specified for _s_i_g, _g_s_i_g_n_a_l returns the value 0 and takes no other action. There are some additional signals with numbers outside the range 1 through 15 which are used by the Standard C Library to indicate error conditions. Thus, some signal numbers outside the range 1 through 15 are legal, although their use may interfere with the operation of the Standard C Library.