*BSD News Article 90885


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!worldnet.att.net!newsadm
From: Steven Farmer <stevenfarmer@worldnet.att.net>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: A shell oddity (bug?)
Date: Wed, 12 Mar 1997 18:33:01 -0600
Organization: AT&T WorldNet Services
Lines: 22
Message-ID: <33274B3D.41C67EA6@worldnet.att.net>
References: <jpt2g5.q2c.ln@dolphin.neosoft.com>
NNTP-Posting-Host: 207.147.1.60
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.01 (X11; I; FreeBSD 2.1.6-RELEASE i386)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:36928

Conrad Sabatier wrote:
[snip...]
> ps -xU news | grep fetch
> 
> Assuming there's a running /usr/local/sbin/fetch (part of the
> leafnode package), then all one *should* see as a result would be:
> 
> <PID> .... /usr/local/sbin/fetch
> 
> However, sometimes the "grep fetch" itself also appears in the
> output!

The real oddity is the fact that the grep command doesn't *always*
appear!  It seems that there must oftentimes be a large delay between
the creation and scheduling of a process and the appearance of the
process info in /proc.  Perhaps the more enlightened out there
can comment on this.

The "grep [f]etch" trick is a good one; I first saw this in O'Reilly's
_Essential System Administration_, a very good book indeed.

Steve