aboutsummaryrefslogtreecommitdiff
path: root/bin/kill
diff options
context:
space:
mode:
Diffstat (limited to 'bin/kill')
-rw-r--r--bin/kill/kill.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/kill/kill.c b/bin/kill/kill.c
index 8ee1d85d398f..f4ab2df3e01a 100644
--- a/bin/kill/kill.c
+++ b/bin/kill/kill.c
@@ -123,10 +123,9 @@ main(int argc, char *argv[])
for (errors = 0; argc; argc--, argv++) {
pid = strtol(*argv, &ep, 10);
- if (!**argv || *ep) {
- warnx("illegal process id: %s", *argv);
- errors = 1;
- } else if (kill(pid, numsig) == -1) {
+ if (!**argv || *ep)
+ errx(1, "illegal process id: %s", *argv);
+ else if (kill(pid, numsig) == -1) {
warn("%s", *argv);
errors = 1;
}