Subject: Re: Killing processes by name (svr4 lameness)
To: None <current-users@NetBSD.ORG>
From: None <is@Beverly.Rhein.DE>
List: current-users
Date: 04/15/1996 10:35:11
Robert Evans (r.evans@ic.ac.uk) wrote:
: 
: On Thu, 11 Apr 1996, John Kohl wrote:
: > 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 "$@"
: 
: This is starting to stray from NetBSD fodder, but under Solaris 2.5 the 
: script is actually thus:
: 
: #!/bin/ksh
: #
: #ident  "@(#)alias.sh   1.1     95/02/06 SMI"
: #
: # Copyright (c) 1995 by Sun Microsystems, Inc.
: #
: cmd=`basename $0`
: $cmd "$@"

I suggest using 
exec $cmd "$@"

instead. No need to fork there, we'll exit the shell anyway.

Regards,
	Ignatios Souvatzis