Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: kill and pid files




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.....



Messages sorted by: Reverse Date, Date, Thread, Author