Signal handling

suggest change

Syntax

Parameters

Parameter | Details |

——— | —–– |

sig | The signal to set the signal handler to, one of SIGABRT, SIGFPE, SIGILL, SIGTERM, SIGINT, SIGSEGV or some implementation defined value |

func | The signal handler, which is either of the following: SIG_DFL, for the default handler, SIG_IGN to ignore the signal, or a function pointer with the signature void foo(int sig);.

Remarks

The usage of signal handlers with only the guarantees from the C standard imposes various limitations what can, or can’t be done in the user defined signal handler.

Behavior is undefined by the C standard if any of the rules above are violated. Platforms may have specific extensions, but these are generally not portable beyond that platform.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents