I have two process P1 and P2. I want to ping from P1 to P2 to tell P2
that it is alive and working. How do I do that?
I have two process P1 and P2. I want to ping from P1 to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On the same machine (assuming there is a file system), you could use a “heart beat file”. Have P1 update the file with the current time-stamp periodically, and P2 can check if that gets too old. You can also write the P1 process id in there, and P2 can check if that pid is still alive.