pkill: fix error printing
Print correct pid number of process that was where not killed because of kill was not successful. Incorrect behaviour before this fix is bello. -- snip $ ps -elf | grep dh[c] 1 S root 1409 1 0 80 0 - 1782 poll_s 02:01 ? 00:00:00 dhclient wlan0 $ pkill dhc pkill: killing pid 1 failed: Operation not permitted -- snip Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
79ceb30b5c
commit
3489b9343e
2
pgrep.c
2
pgrep.c
@ -779,7 +779,7 @@ int main (int argc, char **argv)
|
|||||||
if (errno==ESRCH)
|
if (errno==ESRCH)
|
||||||
// gone now, which is OK
|
// gone now, which is OK
|
||||||
continue;
|
continue;
|
||||||
xwarn(_("killing pid %ld failed"));
|
xwarn(_("killing pid %d failed"), procs[i].num);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (opt_count) {
|
if (opt_count) {
|
||||||
|
Loading…
Reference in New Issue
Block a user