diff options
-rw-r--r-- | usr.bin/pkill/pkill.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/usr.bin/pkill/pkill.c b/usr.bin/pkill/pkill.c index e5e0d93ec57..d7c16eddac1 100644 --- a/usr.bin/pkill/pkill.c +++ b/usr.bin/pkill/pkill.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pkill.c,v 1.27 2012/04/21 03:14:50 guenther Exp $ */ +/* $OpenBSD: pkill.c,v 1.28 2012/07/10 12:48:08 halex Exp $ */ /* $NetBSD: pkill.c,v 1.5 2002/10/27 11:49:34 kleink Exp $ */ /*- @@ -412,12 +412,7 @@ main(int argc, char **argv) if ((kp->p_flag & (P_SYSTEM | P_THREAD)) != 0 || kp->p_pid == mypid) continue; - if (selected[i]) { - if (longfmt && !pgrep) - printf("%d %s\n", (int)kp->p_pid, kp->p_comm); - if (inverse) - continue; - } else if (!inverse) + if (selected[i] == inverse) continue; if ((*action)(kp, j++) == -1) @@ -451,6 +446,8 @@ usage(void) int killact(struct kinfo_proc *kp, int dummy) { + if (longfmt) + printf("%d %s\n", (int)kp->p_pid, kp->p_comm); if (kill(kp->p_pid, signum) == -1 && errno != ESRCH) { warn("signalling pid %d", (int)kp->p_pid); |