Subject: Re: Killing processes by name (svr4 lameness)
To: John Kohl <jtk@kolvir.arlington.ma.us>
From: Eduardo E. Horvath eeh@btr.com <eeh@btr.btr.com>
List: current-users
Date: 04/12/1996 10:12:52
On Thu, 11 Apr 1996, John Kohl wrote:

> >>>>> "JTC" == J T Conklin <jconklin@netcom.com> writes:
> >>>>> "MRG" == <mrg@eterna.com.au> writes:
> 
> MRG> [ warning:  following data may cause violent vomitting ]
> MRG> 
> MRG> oh, and /bin/kill on solaris:
> MRG> 
> MRG> svr4islame ~# cat /bin/kill
> MRG> /bin/sh -c "kill $*"
> 
> JTC> This is not surprising to me, as kill is a perfectly good shell
> JTC> builtin.  Very rarely will /bin/kill be executed itself.  POSIX.2
> JTC> actually recommends using a shell script similar to the above for
> JTC> a handful of utilities that are both builtins and must live as
> JTC> "real" programs.
> 
> However, that script seems excessively inefficient to me.  It gets
> passed to /bin/sh to interpret, which then runs as a subprocess
> 	/bin/sh -c "kill $*"
> I suppose we should file a bug with sun suggesting this instead:
> 
> 	#!/bin/sh
> 	kill "$@"

No need.  It't now been changed to:

$cmd "$@"

But now it uses ksh 8^)

Eduardo