I'm writing some code to support an automated build system that runs on many computers with a large variety of operating systems from flavours of Windows (since Windows 2000) to Linux and various versions of unix (HP, Solaris, AIX etc). We use SSH as the basic transport mechanism to run scripts remotely.
My question is how to track child processes that run remotely on these machines so that if something goes wrong (or hangs indefinitely) the errant process can be identified and terminated? What is the most efficient way of doing this - I'm trying to avoid something that polls the process table using a tool like 'ps'.