I have a program that launches another (allows you to call the first Stater application and the second application - Worker).
I use
process.start(); process.waiForExit(); process.Close();
in the starter.
But if Starter is forced to close, waiting for the Worker (for some reason), the Worker will still be in the process, blocking files, there is memory, etc.
So, I want to check if Worker is working before I try to start it. I tried Process.GetProcessesByName ("worker.exe") but no luck (even if I see Worker in the task manager).
I saw here several topics about checking each process in memory for my modules, but still I already know that the file is working, which I hope to avoid such a solution.
Any tips?
source share