Previous Page
Next Page

raise

Raises a signal

#include <signal.h>
int raise ( int sig  );

The raise( ) function sends the signal identified by sig to the program. If the program has installed a handler for the given signal by means of a call to the signal( ) function, then that handler routine runs when the signal is raised, and raise( ) does not return until the handler function has returned. If the signal handler doesn't end the program, the return value of raise( ) is 0 if it succeeds in raising the signal, otherwise a nonzero value.

Macros for values of the argument sig are defined in the standard header signal.h, and are described under signal( ) in this chapter.


Example

See the example for signal( ) in this chapter.

See Also

abort( ), signal( ), feraiseexcept( )


Previous Page
Next Page