public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* if_exist_pid()
@ 2002-07-16 17:19 Richard B. Johnson
  2002-07-16 17:42 ` if_exist_pid() Kasper Dupont
  2002-07-19 14:55 ` if_exist_pid() Hubertus Franke
  0 siblings, 2 replies; 3+ messages in thread
From: Richard B. Johnson @ 2002-07-16 17:19 UTC (permalink / raw)
  To: Linux kernel


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. This is to release
a user-mode lock (semaphore) if the task that held the lock
crashed. Maybe there is a 'if_exist_pid(pid)' call somewhere?
Sending signal 0 to a pid sometimes returns 0, even if the pid
is long-gone and I don't want to read /proc to look for info.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

                 Windows-2000/Professional isn't.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-07-19 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-16 17:19 if_exist_pid() Richard B. Johnson
2002-07-16 17:42 ` if_exist_pid() Kasper Dupont
2002-07-19 14:55 ` if_exist_pid() Hubertus Franke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox