----- Original Message -----
From: "Igor Pechtchanski" <pechtcha@cs.nyu.edu>
To: "Richard Anderson" <richard@richard-anderson.org>
Cc: <cygwin@cygwin.com>
Sent: Wednesday, July 23, 2003 2:34 PM
Subject: Re: Cygwin prevents normal Windows shutdown
> On Mon, 21 Jul 2003, Richard Anderson wrote:
>
> > When I start Cygwin 1.3.22-1 with the installed shortcut (which points to
> > C:\cygwin\cygwin.bat) and then try to shut down Windows XP using
the normal
> > Start / Turn Off Computer procedure, Windows pops up the "End Program -
> > Cygwin ... Windows cannot end this program" dialog box. The cygwin ps
> > command shows only a bash shell running.
> >
> > Is there some way to prevent this behavior?
> > Richard Anderson
>
> Richard,
>
> Apparently, bash doesn't react to the shutdown message that Windows XP
> sends it. I've observed similar behavior with Windows 9x. Can you close
> the bash window via the 'X' ("Close") button? If not, then it's possible
> that the correct WM_CLOSE message simply isn't passed to or handled by the
> bash shell (and any other console Cygwin process). On Windows NT/2k,
> using the 'X' button sends a HUP signal to the shell. This doesn't seem
> to happen on Windows 9x (and, possibly, Windows XP -- I don't have an XP
> system to test this on). You could try to incite someone knowledgeable in
> Windows messaging (not me, sorry) to investigate this further.
> Igor
Igor,
Windows XP and 2K are derived the same code base (or at least more so
than 2K and 98), so most systems calls should behave the same. The
bash window closes normally when I click the Close button. All
third-party Windows apps I have used except Cygwin show the normal
behavior on Windows - they gracefully exit without invoking the End
Process pop-up. So it's likely that Cygwin is not following the
Windows API standard for catching and handling this interrupt.