Ignoring the Signal

When a delivered signal is explicitly ignored, the do_signal( ) function normally just continues with a new execution of the loop and therefore considers another pending signal. One exception exists, as described earlier:

if (ka->sa.sa_handler == SIG_IGN) { if (signr == SIGCHLD)

while (sys_wait4(-1, NULL, WNOHANG, NULL) > 0) /* nothing */; continue;

If the signal delivered is sigchld, the sys_wait4( ) service routine of the wait4( ) system call is invoked to force the process to read information about its children, thus cleaning up memory left over by the terminated child processes (see Section 3.5).

Continue reading here: Executing the Default Action for the Signal

Was this article helpful?

0 0