Next Previous Contents

3.137 signal

Function

Install a signal handler.

Header

signal.h

Declaration

__sigfunc __fastcall__ signal (int sig, __sigfunc func);

Description

signal installs a handler for the given signal. The handler may either be a user supplied function, or one of the predefined signal handlers SIG_IGN or SIG_DFL. The function returns the previous value if the signal , or the special function vector SIG_ERR in case of an error.

Limits

  • The function is only available as fastcall function, so it may only be used in presence of a prototype.

Availability

ISO 9899

See also

abort, raise

Example

None.


Next Previous Contents