Project

General

Profile

Bug #3248 » 0003-sh-1-don-t-kill-everything-when-killjob-fails.patch

piecuch, 09/16/2020 11:16 AM

View differences:

bin/kill/kill.c
for (errors = 0; argc; argc--, argv++) {
#ifdef SHELL
if (**argv == '%')
pid = killjob(*argv, numsig);
ret = killjob(*argv, numsig);
else
#endif
{
......
pid = (pid_t)pidl;
if (!**argv || *ep || pid != pidl)
errx(2, "illegal process id: %s", *argv);
ret = kill(pid, numsig);
}
if (kill(pid, numsig) == -1) {
if (ret == -1) {
warn("%s", *argv);
errors = 1;
}
(2-2/10)