begin  quoting Carl Lowenstein as of Wed, Oct 18, 2006 at 09:58:52PM -0700:
> On 10/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >On Wed, Oct 18, 2006 at 07:42:56PM -0700, Carl Lowenstein wrote:
> >> Is anyone other than "seb" running "start.py"?
> >
> >I thought you might wonder that.  The problem is when
> >root grep's for start.py.  That very search itself enters
> >the ps table!
> 
> All right, this is a problem with a classical known solution.
> I forgot about that.  Same thing in the gawk RE.
> grep for [s]tart.py

Huh. I've always used "grep -v grep" for that.

>  "[s]tart" matches "start" but does not match itself.
> 
> $ kill -HUP $( ps -eo pid,cmd | gawk '/[s]tart.py/{print $1; exit}' )
> 
> Also even without the [ ] trick to eliminate the extra match, the gawk
> one-liner exits after the first match.  Under normal circumstances,
> the self-match result will come after the one you really want.
> "Normal circumstances" probably means that PIDs haven't wrapped.

That happens to me all the time.  Especially on rohan, the big machine
at SDSU.

Of course, I use the grep -v grep trick, which means I consume more PIDs
than those folks who alter their search string.  So it's more likely
that I'll wrap, eh? :)

-- 
_ |\_
 \|


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to