October 2018
Beginner
794 pages
19h 23m
English
The SA_RESETHAND signal flag is a bit peculiar. On older Unix platforms, there existed a bug that went like this: a signal is trapped (via the signal(2) function), the signal is dispatched, and then the process handles the signal. But, immediately on entering the signal handler, the kernel now resets the signal action to the original OS default handling code. So, the second time the signal arrives, the default handler code runs, often killing the process in the bargain. (Again, Unix developers sometimes had to resort to some bad racy code to try to fix this).
Thus, the signal would effectively be delivered only once. On today's modern Linux systems, a signal handler remains as it is; it is not reset by default ...
Read now
Unlock full access