Hi,

Can a process check if a given PID exists or not? In other words can a
process check if an unrelated process is alive? Is there any system
call that does this?

I can think of a (few) work arounds to this:

1. open("/proc/pid_in_question") will return true if the process with
pid = pid_in_question is alive.

2. lock a file called ``pid_in_question". Test the lock from the other
process.  If the process is dead then there is no lock on the file
``pid_in_question".

Any ideas/comments?

Thanks,

Hareesh
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" 
in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to