in reply to Re: How to Determine if a WIN32 Process is Hung
in thread How to Determine if a WIN32 Process is Hung

This is educated conjecture...

Windows sends a message to the application; if the application takes N seconds without (a) responding to that message, or (b) receiving the message and letting it die, then it considers it "hung." You can easily write small applications which do this, just by doing something as benign as a sleep for 100 seconds.

It could be smarter, and there are other issues with multiple-threaded applications: are all threads in a WaitForObject state at the same time (deadlock)? Has it handled ANY messages, not just the one test message?

--
[ e d @ h a l l e y . c c ]

  • Comment on Re^2: How to Determine if a WIN32 Process is Hung