in reply to Detecting hung conditions in win32
Take a look at Win32::Process, especially GetExitCode($exitcode) and Wait($timeout).