Process Monitoring
-
Hi, I have built an application that launches many other processes and then monitors the state of those processes periodically. To monitor the status, I use the Process Id that I get when I call CreateProcess to create a process. But, I am having a problem with the current implementation - I have observed that the same process ID can be allocated to a process, if the previous one with is dead. This happens within a short time. Therefore, if I note the ID of a process and then monitor it after say, 1 minute I may be monitoring a some new process if the one that I started was killed. Is there any unique way to identify the process?
-
Hi, I have built an application that launches many other processes and then monitors the state of those processes periodically. To monitor the status, I use the Process Id that I get when I call CreateProcess to create a process. But, I am having a problem with the current implementation - I have observed that the same process ID can be allocated to a process, if the previous one with is dead. This happens within a short time. Therefore, if I note the ID of a process and then monitor it after say, 1 minute I may be monitoring a some new process if the one that I started was killed. Is there any unique way to identify the process?
If possible, call CreateProcess from separate thread, then use WaitForSingleObject with process handle to get notified of process termination. Tomasz Sowinski -- http://www.shooltz.com