From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15174 invoked from network); 19 Jun 1997 06:15:42 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 19 Jun 1997 06:15:41 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id CAA08403; Thu, 19 Jun 1997 02:06:53 -0400 (EDT) Resent-Date: Thu, 19 Jun 1997 02:06:27 -0400 (EDT) Reply-To: Vardhan Varma Date: Thu, 19 Jun 1997 10:53:53 +0000 ( ) From: Vardhan Varma To: Timothy J Luoma Cc: Robert Stone , zsh-users@math.gatech.edu Subject: Re: kill and pid files In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Resent-Message-ID: <"LwdaD.0.D22.ZnCgp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/906 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Wed, 18 Jun 1997, Timothy J Luoma wrote: > On Wed, 18 Jun 1997, Robert Stone wrote: > > > Is there any reason kill should not take a filename as an > > argument? i.e. if the job specification is not a legal job name, or a > > legal pid, why not try to open a file with that name and see if it's > > first line is a valid pid? > > well, I don't have the file part, but I use this > > pid () { > > for i in $* > do > echo `/bin/ps -auxwww | grep -v grep | > grep -w $i | awk '{print $2}' | tr -s '\012' ' '` > > done > > } > > and then use it for something like > > kill -HUP `pid sendmail` > thankfully i've a pidof on my linux box, so i can just say kill -9 `pidof doit` try it on you box who knows.....