in reply to How to Determine if a WIN32 Process is Hung

If the process is a windows "service" then you should try to use the mechanism windows has within that API. The windows service API has an "INTERROGATE" request(or message) that is sent to the service, and as halley said it must respond within a certain amount of time - else be considered hung/unresponsive. You can perform this check using the Win32::Service 's "GetStatus" method, or another likely option is with WMI (using Win32::OLE)

If its not a windows service I don't know what to suggest. I've seen utilities output the status of threads (e.g. "waiting") - I wonder if that type of information would be useful for determining if a process is hung. Not that I can suggest how to tap that info from perl.
  • Comment on Re: How to Determine if a WIN32 Process is Hung