bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [Win32 Patch] console-close events


From: Gisle Vanem
Subject: Re: [Bug-wget] [Win32 Patch] console-close events
Date: Tue, 21 Oct 2014 12:46:29 +0200

"Ángel González" <address@hidden> 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 address@hidden

* 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]