in reply to Detect Process End
If your question is not about child processes, you may want to dig into IPC and interprocess signalling.
-QM -- Quantum Mechanics: The dreams stuff is made of