Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: kill and pid files
- X-seq: zsh-users 906
- From: Vardhan Varma <vardhan@xxxxxxxxxxxxxxxxx>
- To: Timothy J Luoma <luomat@xxxxxxxx>
- Subject: Re: kill and pid files
- Date: Thu, 19 Jun 1997 10:53:53 +0000 ( )
- Cc: Robert Stone <rstone@xxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <Pine.NXT.3.96.970618161237.19016A-100000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Vardhan Varma <parsec@xxxxxxxxxxxxxxxxxxxx>
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