>>> I can reproduce it, too. However, I can not reproduce it on Windows >>> Server 2008 x64 so it seems a problem of the NT 5.2 kernel alone. >>> I tried debugging and changed a couple of places in the DLL as well >>> as in cygrunsrv trying to track it down. The hang does not occur in >>> Cygwin code, afaics, but in OS code and changing related parts of the >>> custom console handling doesn't change anything. That's all I can do >>> for now, sorry. >> Could you explain the interaction between Cygwin and OS in the related >> part? I would like to have a look at it, but I need some directions. > > Well, there's no real interaction. When you logoff, the service > application (which is cygrunsrv, not cygserver or sshd) gets a > console event CTRL_LOGOFF_EVENT. The Cygwin DLL has a handler function > (exceptions.cc:ctrl_c_handler) which doesn't do much on CTRL_LOGOFF_EVENT. > > For testing I disabled everything and I even added a ConsoleCtrlHandler > function to cygrunsrv which returns TRUE. The function is called and > that's it. After that, the system hangs out for ~30 seconds for no > apparent reason. > > Still note that this only happens on the 5.2 x64 kernel, not on the 6.0 > x64 kernel, so I don't see how this is actually Cygwin's fault or if > we can do anything against that effect.
I have created and installed my own test service. For this purpose, I've used Java Service Wrapper, which is from OS perspective just a pure 32-bit console program like cygrunsrv. And it works flawlessly, there's no delay at logoff :-/ It only has this one problem: there's no source for the DLL it uses. Could it be something we're missing? Perhaps not in the ConsoleCtrlHandler itself? S -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/