Have error_msg() and friends set TT.exitval to 1 if it's still 0, clean out other places that were setting it that no longer need to.
diff --git a/toys/posix/kill.c b/toys/posix/kill.c
index 2d1606b..1e5e1d9 100644
--- a/toys/posix/kill.c
+++ b/toys/posix/kill.c
@@ -62,9 +62,6 @@
char *arg = *(args++);
pid = strtol(arg, &tmp, 10);
- if (*tmp || kill(pid, signum) < 0) {
- error_msg("unknown pid '%s'", arg);
- toys.exitval = EXIT_FAILURE;
- }
+ if (*tmp || kill(pid, signum) < 0) error_msg("unknown pid '%s'", arg);
}
}