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:
Sami Kerola 2012-01-21 02:09:48 +01:00
parent 79ceb30b5c
commit 3489b9343e

View File

@ -779,7 +779,7 @@ int main (int argc, char **argv)
if (errno==ESRCH)
// gone now, which is OK
continue;
xwarn(_("killing pid %ld failed"));
xwarn(_("killing pid %d failed"), procs[i].num);
}
} else {
if (opt_count) {