From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 1182 invoked from network); 8 Oct 1999 17:06:36 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 8 Oct 1999 17:06:36 -0000 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id NAA18292 for ; Fri, 8 Oct 1999 13:06:35 -0400 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id LAA02565 for axp-list@redhat.com; Fri, 8 Oct 1999 11:06:32 -0600 From: Michal Jaegermann Message-Id: <199910081706.LAA02565@ellpspace.math.ualberta.ca> Subject: Re: Semi-success with Jensen Installation... To: axp-list@redhat.com Date: Fri, 8 Oct 1999 11:06:32 -0600 (MDT) In-Reply-To: <37FE0034.5BC52301@physics.utexas.edu> from "Jo Schambach" at Oct 8, 99 09:31:16 am Content-Type: text 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