Re: Detecting threads vs processes with ps or /proc

Robert Love (rml@tech9.net)
08 Dec 2002 22:47:59 -0500


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/