Re: Gack, this shouldn't happen under a stable OS I think

Kailasapathi R (pathi@lantana.iitm.ernet.in)
Wed, 25 Sep 1996 14:10:41 +0500 (GMT+0500)


Hi,
I have a doubt on your statement......

On 24 Sep 1996, Olaf Titz wrote:

> Chris Fearnley <cjf@netaxs.com> wrote:
> > root@syntropy # ps aux|grep 27231
> > root 27231 0.0 2.1 828 324 p7 S 23:28 0:00 /usr/sbin/radiusd
> > root@syntropy # ps aux|grep 27231
> > root 27231 0.0 2.1 828 324 p7 S 23:28 0:00 /usr/sbin/radiusd
> > root 27239 0.0 2.5 916 376 p7 S 23:28 0:00 grep 27231
> > Why doesn't the grep process show up each time???
>
> Race condition between ps and grep (which one of them is finished
> faster and in which order does ps output come up). At least newer
> versions of procps support a pid argument to ps, so you can do
> ps -aux 27231.

ps -aux is one process and grep is another process, so ps process
out put is given to grep process as input through pipe, so grep is always
depend on ps, then how come race condtion could happen.
can you please explain?.

Thanks
Pathi