sig: Don't reset CHLD handler to old action, DFL it
The whole idea behind this code was to stop receiving CHLD from restored tasks after resume. The comment about this is done for scripts is wrong (we call more scripts before this) because sigchld_handler() knows about scripts: commit de71bc69 exit = (siginfo->si_code == CLD_EXITED); status = siginfo->si_status; + + /* skip scripts */ + if (!current && root_item->pid.real != pid) { + pid = waitpid(root_item->pid.real, &status, WNOHANG); + if (pid <= 0) + return; + } And since CHLD handler makes little sence after exec, it's easier just to reset one to default action at the end. Signed-off-by:Pavel Emelyanov <xemul@parallels.com> Acked-by:
Andrew Vagin <avagin@parallels.com>
Showing
Please
register
or
sign in
to comment