Date: Thu, 18 Sep 1997 13:21:46 +0930 From: Greg Lehey <grog@lemis.com> To: "Rodney W. Grimes" <rgrimes@GndRsh.aac.dev.com> Cc: question@lemis.com Subject: Re: sorry to ask a freebsd-question question! Message-ID: <19970918132146.48861@lemis.com> Resent-Message-ID: <199709180354.NAA15585@freebie.lemis.com> In-Reply-To: <199709171427.HAA08519@GndRsh.aac.dev.com>; from Rodney W. Grimes on Wed, Sep 17, 1997 at 07:27:09AM -0700 References: <Pine.BSF.3.91.970917200519.818Q@panda.hilink.com.au> <199709171427.HAA08519@GndRsh.aac.dev.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 17, 1997 at 07:27:09AM -0700, Rodney W. Grimes wrote: >> On Wed, 17 Sep 1997, xiyuan qian wrote: >> >>> Hi, I know "ps -ax | grep ppp" can find the ppp running's pid, but when I do >>> that, it sometimes show me >>> 616 .... ppp >>> 716 .... ps -ax | grep ppp >>> or sometimes it only show me >>> 616 ....ppp >>> Why? How can I deny the "ps -ax | grep ppp" showing out? >> >> ps -ax | fgrep ppp | fgrep -v fgrep > > Stop with the silliness, just go get pppd's pid(s) from /var/run/ppp*.pid You're assuming that's all he wants to know. There are really two questions here. One has been answered to death. The other one is "why do I sometimes get the grep process listed and sometimes not?". The answer is that it's a race condition in the process table. I still can't understand why it happens so often, though. Greg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970918132146.48861>