Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Michal Jaegermann <michal@ellpspace.math.ualberta.ca>
To: axp-list@redhat.com
Subject: Re: Semi-success with Jensen Installation...
Date: Fri, 8 Oct 1999 11:06:32 -0600 (MDT)	[thread overview]
Message-ID: <199910081706.LAA02565@ellpspace.math.ualberta.ca> (raw)
In-Reply-To: <37FE0034.5BC52301@physics.utexas.edu> from "Jo Schambach" at Oct 8, 99 09:31:16 am

Jo Schambach wrote:
> 
> I also replaced the "killproc" function in this
> file, since it also seems to hang, with the following:
> 
> killproc() {            # kill the named process(es)
>         pid=`/bin/ps -e |
>              /bin/grep -w $1 |
>              /bin/sed -e 's/^  *//' -e 's/ .*//'`
>         [ "$pid" != "" ] && kill $pid
> }

If you do not filter out, say with 'grep -v', processes which
are doing 'grep' then you have a race and sometimes this will work
and sometimes you will pick up this process which does here
'/bin/grep -w $1'.   You may also delete 'grep' in this 'sed'
expression but something should do it.

Besides something like 
         pid="`/sbin/pidof $1`"
is simpler and likely more reliable.

   Michal


  reply	other threads:[~1999-10-08 17:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-08 13:57 Semi-success with Jensen Installation Champigny, Michael
1999-10-08 14:31 ` Jo Schambach
1999-10-08 17:06   ` Michal Jaegermann [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-10-08 14:59 Champigny, Michael
1999-10-08 15:39 ` Jo Schambach
1999-10-08 15:54 Jim Wilson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox