"Ángel González" <[email protected]> wrote:
I would expect someone running a console application to have a console open. I understand the rationale when it's a beginner learning to program and is creating a console application, but don't really see a usecase for wget. How are you running wget that you get an autoclosing console?
Easily. When e.g. Windows needs to restart (because of a WinUpdate etc.). It sends a WM_QUERYENDSESSION to all (?) top-level windows. The Console handler translates that to a CTRL_SHUTDOWN_EVENT for the program in that console. Details here: http://blogs.msdn.com/b/ntdebugging/archive/2007/06/09/how-windows-shuts-down.aspx Darit, about the git format-patch. I don't know how. The src/Changelog entry could simply be: 2014-10-21 Gisle Vanem [email protected] * mswindows.c (ws_handler): Added handling of CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT and CTRL_SHUTDOWN_EVENT to cleanup before Wget exits. Added function ws_event_name() to retrieve the event name. The diff for mswindows.c is as in my original message. --gv
