On Tue, 4 Jul 2000, Narayana Yaddanapudi wrote:
> As a follow up, the first invocation of grep in a session always shows
> the output. Any later invocation doesn't, even if it is some time later.
Just not true.
<cut>
[ajayd@ajayd ajayd]$ ps -aux |grep grep
ajayd 2063 0.0 0.8 1360 508 pts/0 R 00:28 0:00 grep grep
[ajayd@ajayd ajayd]$ ps -aux |grep grep
ajayd 2065 0.0 0.8 1360 516 pts/0 S 00:28 0:00 grep grep
[ajayd@ajayd ajayd]$ ps -aux |grep grep
ajayd 2067 0.0 0.8 1360 508 pts/0 R 00:28 0:00 grep grep
[ajayd@ajayd ajayd]$
</cut>
It seems to depend only on whether grep's pid is reflected in /proc by the
time ps reads it.
-----------------------------------------------------------------------
For information on this and other Linux India mailing lists check out
http://lists.linux-india.org/