Subject: bin/842: /bin/kill does not handle -0
To: None <gnats-admin@NetBSD.ORG>
From: Simon J. Gerraty <sjg@zen.void.oz.au>
List: netbsd-bugs
Date: 03/04/1995 20:20:05
>Number: 842
>Category: bin
>Synopsis: /bin/kill gives error for -0
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 4 20:20:03 1995
>Originator: Simon J. Gerraty
>Organization:
Zen Programming...
>Release: 1.0
>Environment:
System: NetBSD zen.void.oz.au 1.0 NetBSD 1.0 (ZEN) #6: Tue Dec 13 09:55:20 EST 1994 root@zen.void.oz.au:/usr/src/sys/arch/i386/compile/ZEN i386
>Description:
I can't believe I haven't spotted this before...
/bin/kill -0 $$
fails stating that 0 is an illegal signal.
This bug breaks 100's of valid scripts out there...
>How-To-Repeat:
/bin/kill -0 $$
>Fix:
*** bin/kill/kill.c.~1~ Fri Dec 17 16:47:41 1993
--- bin/kill/kill.c Sun Mar 5 14:32:47 1995
***************
*** 123,129 ****
"kill: illegal signal number %s\n", *argv);
exit(1);
}
! if (numsig <= 0 || numsig >= NSIG) {
nosig(*argv);
/* NOTREACHED */
}
--- 123,129 ----
"kill: illegal signal number %s\n", *argv);
exit(1);
}
! if (numsig < 0 || numsig >= NSIG) {
nosig(*argv);
/* NOTREACHED */
}
>Audit-Trail:
>Unformatted: