Re: if_exist_pid()

From: Kasper Dupont (kasperd@daimi.au.dk)
Date: Tue Jul 16 2002 - 12:42:06 EST


"Richard B. Johnson" wrote:
>
> Anybody know the 'correct' way of determining if a pid still
> exists? I've been using "kill(pid, 0)" and, if it does not
> return an error, it is supposed to exist.

That is correct.

> Sending signal 0 to a pid sometimes returns 0, even if the pid
> is long-gone

Really? That would mean there is a bug in kill(). Of course
you can get return value 0 if the pid has been recycled, but
otherwise it should not happen.

-- 
Kasper Dupont -- der bruger for meget tid på usenet.
For sending spam use mailto:razrep@daimi.au.dk
or mailto:mcxumhvenwblvtl@skrammel.yaboo.dk
-
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/



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:20 EST