diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-06 13:29:09 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-02-06 13:29:09 +0000 |
commit | 2e3317ab4e7876e95163c9e8f5248940d56836d9 (patch) | |
tree | 0eb4f499defe9579796ca1d3f9e999370fa6190d /bin/kill/kill.c | |
parent | ddd278320449ef4a3f57d78fc1dedfe3927d18df (diff) |
make "/bin/kill -CONT ''" abort correctly; arnej@imf.unit.no
Diffstat (limited to 'bin/kill/kill.c')
-rw-r--r-- | bin/kill/kill.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/kill/kill.c b/bin/kill/kill.c index dc16479b85f..e6933e14a51 100644 --- a/bin/kill/kill.c +++ b/bin/kill/kill.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kill.c,v 1.2 1996/06/23 14:20:14 deraadt Exp $ */ +/* $OpenBSD: kill.c,v 1.3 1997/02/06 13:29:08 deraadt Exp $ */ /* $NetBSD: kill.c,v 1.11 1995/09/07 06:30:27 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)kill.c 8.4 (Berkeley) 4/28/95"; #else -static char rcsid[] = "$OpenBSD: kill.c,v 1.2 1996/06/23 14:20:14 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: kill.c,v 1.3 1997/02/06 13:29:08 deraadt Exp $"; #endif #endif /* not lint */ @@ -115,7 +115,7 @@ main(argc, argv) nosig(*argv); } else if (isdigit(**argv)) { numsig = strtol(*argv, &ep, 10); - if (!*argv || *ep) + if (*ep) errx(1, "illegal signal number: %s", *argv); if (numsig < 0 || numsig >= NSIG) nosig(*argv); @@ -129,7 +129,7 @@ main(argc, argv) for (errors = 0; argc; argc--, argv++) { pid = strtol(*argv, &ep, 10); - if (!*argv || *ep) { + if (!**argv || *ep) { warnx("illegal process id: %s", *argv); errors = 1; } else if (kill(pid, numsig) == -1) { |