Subject: bin/15008: [PATCH] Fix entry listed in BUGS section for kill(1)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sketch@rd.bbc.co.uk>
List: netbsd-bugs
Date: 12/20/2001 02:42:34
>Number:         15008
>Category:       bin
>Synopsis:       [PATCH] Fix entry listed in BUGS section for kill(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 20 02:43:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Perkin
>Release:        1.5Y
>Organization:
British Broadcasting Corporation
>Environment:
NetBSD trumpton.intra.nut 1.5Y NetBSD 1.5Y (GENERIC_LAPTOP) #0: Sat Nov 10 15:12:55 UTC 2001     root@celeron:/usr/obj/local1/src/src/sys/arch/i386/compile/GENERIC_LAPTOP i386
>Description:
"man kill" lists:

BUGS
     A replacement for the command ``kill 0'' for csh(1) users should be pro-
     vided.

So apply the following patch to implement csh compatibility and remove
the BUGS entry.
>How-To-Repeat:
csh% kill -HUP 0

csh% sh
$ /bin/kill -HUP 0
>Fix:
Index: kill.1
===================================================================
RCS file: /home/ncvs/basesrc/bin/kill/kill.1,v
retrieving revision 1.13
diff -r1.13 kill.1
95a96,98
> .It 0
> Send specified signal to the parent process.  This is provided for csh
> compatibility.
143,148d145
< .Sh BUGS
< A replacement for the command
< .Dq Li kill 0
< for
< .Xr csh  1
< users should be provided.
Index: kill.c
===================================================================
RCS file: /home/ncvs/basesrc/bin/kill/kill.c,v
retrieving revision 1.19
diff -r1.19 kill.c
49a50,51
> #include <sys/types.h>
> 
56a59
> #include <unistd.h>
130a134,138
> 
>               /* csh(1) compatibility - "kill -SIG 0" sends SIG to parent */
>               if (pid == 0)
>                       pid = getppid();
> 

>Release-Note:
>Audit-Trail:
>Unformatted: