Re: Detecting threads vs processes with ps or /proc

Robert Love
2002-12-09T03:40:01Z

On Sun, 2002-12-08 at 22:18, Nick LeRoy wrote:

> Yeah, I thought of that, too. Probably not too likely, of course, but it
> still there. Murphy rules.
>
> Robert: Any thoughts on this?

Sure, it can happen. The original poster asked me this in private the
other day. The race is pretty improbable but it certainly can happen.
The heuristic is imperfect. Then again, this same sort of thing can
occur in other places too since all the reads in /proc are non-atomic
wrt each other.

Robert Love