function old new delta
kill_main 943 992 +49
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
if (killall5) {
pid_t sid;
procps_status_t* p = NULL;
- int ret = 0;
+ /* compat: exitcode 2 is "no one was signaled" */
+ int ret = 2;
/* Find out our session id */
sid = getsid(pid);
int i;
if (p->sid == (unsigned)sid
+ || p->sid == 0 /* compat: kernel thread, don't signal it */
|| p->pid == (unsigned)pid
|| p->pid == 1
) {
goto dont_kill;
}
kill(p->pid, signo);
+ ret = 0;
dont_kill: ;
}
resume: