On 08/05/09 17:48, Michael Goldish wrote:
You should use wait() to find out if the process is alive, not tricks
with the PID and process name, which are racy as you found out.

I'm not sure I can do that because the process I'm interested in isn't a
child of mine.

wait() doesn't work then.  But why it isn't a child?

In any case, I'd still need to use the process name to make sure the PID
belongs to the original process, because PIDs are reused after a while.

No. If it is your child the process continue to exist as zombie until you've asked for the exit status using wait().

cheers,
  Gerd
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to