October 2018
Beginner
794 pages
19h 23m
English
Dramatic as it sounds, here we point out a simple wrapper API: the raise(3) library call. Here is its signature:
include <signal.h>int raise(int sig);
It's really very simple: given a signal number, the raise API raises, sends, the given signal to the calling process (or thread). If the signal in question is caught, the raise will return only once the signal handler has completed.
Recall that we have used this API in our handle_segv.c program earlier in this chapter: we used it to ensure that, for the signal SIGSEGV, after our own handling is done, we re-raise the same signal on ourselves, thereby ensuring that the core dump occurs.
(Well, philosophically, though, there's only so much that getting that raise ...
Read now
Unlock full access