ssignal

Allows you to specify the action to take when a particular signal is raised.

Format

#include  <signal.h>

void  (*ssignal (int sig, void (*func)
      (int, . . . ))) (int, . . . );

Arguments

sig
A number or mnemonic associated with a signal. The symbolic constants for signal values are defined in the <signal.h> header file (see Chapter 4).
func
The action to take when the signal is raised, or the address of a function that is executed when the signal is raised.

Description

This function is equivalent to the signal function except for the return value on error conditions.

Since the signal function is defined by the ANSI C standard and the ssignal function is not, use signal for greater portability.

See Section 4.2 for more information on signal handling.

Return Values
The address of the function previously established as the action for the signal. The address may be the value SIG_DFL (0) or SIG_IGN (1). 
Indicates errors. For this reason, there is no way to know whether a return status of 0 indicates failure, or whether it indicates that a previous action was SIG_DFL (0).  


Previous Page | Next Page | Table of Contents | Index