public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Curtis Galloway <curtis@pdi.com>
To: cygwin@sourceware.cygnus.com
Subject: Handling CTRL_LOGOFF_EVENT
Date: Fri, 19 Feb 1999 09:27:00 -0000	[thread overview]
Message-ID: <36CD9E93.553E7BFB@pdi.com> (raw)

I submitted a fix a while ago to the winsup module regarding bash hanging when
I rebooted my NT machine.  The problem was that the cygwin signal handler was
returning TRUE after receiving a CTRL_CLOSE_EVENT or CTRL_SHUTDOWN_EVENT window
event, so Windows thought that cygwin programs refused to exit when you were
shutting down the system.  This resulted in Windows popping up a dialog box for
every open bash window asking if you wanted to kill the program.

That particular problem was fixed, but the problem still occurs if you log out
rather than shutting down the machine.  I have enclosed a patch below, which I
have been using for some time with no problems.

I haven't tested with programs that act as NT services, though, and I'm unsure
what the consequences of this change would be to such a program.  Anyone
writing NT services out there?

--Curtis



*** exceptions.cc.00    Fri Dec 04 04:35:03 1998
--- exceptions.cc       Wed Jan 27 15:45:54 1999
***************
*** 534,540 ****
    BOOL ret;

    if (type == CTRL_LOGOFF_EVENT)
!     return 1;

    if ((type == CTRL_CLOSE_EVENT) || (type == CTRL_SHUTDOWN_EVENT))
      /* Return FALSE to prevent an "End task" dialog box from appearing
--- 534,540 ----
    BOOL ret;

    if (type == CTRL_LOGOFF_EVENT)
!     return FALSE;

    if ((type == CTRL_CLOSE_EVENT) || (type == CTRL_SHUTDOWN_EVENT))
      /* Return FALSE to prevent an "End task" dialog box from appearing

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

WARNING: multiple messages have this Message-ID
From: Curtis Galloway <curtis@pdi.com>
To: cygwin@sourceware.cygnus.com
Subject: Handling CTRL_LOGOFF_EVENT
Date: Sun, 28 Feb 1999 23:02:00 -0000	[thread overview]
Message-ID: <36CD9E93.553E7BFB@pdi.com> (raw)
Message-ID: <19990228230200.mLwjHGUk_OYDzYT7OUdYp3fhnceEkQhZFvqDYD2dWIY@z> (raw)

I submitted a fix a while ago to the winsup module regarding bash hanging when
I rebooted my NT machine.  The problem was that the cygwin signal handler was
returning TRUE after receiving a CTRL_CLOSE_EVENT or CTRL_SHUTDOWN_EVENT window
event, so Windows thought that cygwin programs refused to exit when you were
shutting down the system.  This resulted in Windows popping up a dialog box for
every open bash window asking if you wanted to kill the program.

That particular problem was fixed, but the problem still occurs if you log out
rather than shutting down the machine.  I have enclosed a patch below, which I
have been using for some time with no problems.

I haven't tested with programs that act as NT services, though, and I'm unsure
what the consequences of this change would be to such a program.  Anyone
writing NT services out there?

--Curtis



*** exceptions.cc.00    Fri Dec 04 04:35:03 1998
--- exceptions.cc       Wed Jan 27 15:45:54 1999
***************
*** 534,540 ****
    BOOL ret;

    if (type == CTRL_LOGOFF_EVENT)
!     return 1;

    if ((type == CTRL_CLOSE_EVENT) || (type == CTRL_SHUTDOWN_EVENT))
      /* Return FALSE to prevent an "End task" dialog box from appearing
--- 534,540 ----
    BOOL ret;

    if (type == CTRL_LOGOFF_EVENT)
!     return FALSE;

    if ((type == CTRL_CLOSE_EVENT) || (type == CTRL_SHUTDOWN_EVENT))
      /* Return FALSE to prevent an "End task" dialog box from appearing

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


             reply	other threads:[~1999-02-19  9:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-19  9:27 Curtis Galloway [this message]
1999-02-28 23:02 ` Curtis Galloway
1999-02-19 10:36 Sergey Okhapkin
1999-02-19 12:52 ` Curtis Galloway
1999-02-28 23:02   ` Curtis Galloway
1999-02-28 23:02 ` Sergey Okhapkin
1999-02-19 13:18 Sergey Okhapkin
1999-02-19 15:47 ` Curtis Galloway
     [not found]   ` < 36CDF573.361DC410@pdi.com >
1999-02-19 17:24     ` Christopher Faylor
1999-02-28 23:02       ` Christopher Faylor
1999-02-28 23:02   ` Curtis Galloway
1999-10-27  5:42   ` Tom Rodman
1999-10-31 19:54     ` Tom Rodman
1999-02-28 23:02 ` Sergey Okhapkin
     [not found] <38172EB6.6F7DC9BA@pdi.com>
1999-10-28  7:12 ` Tom Rodman
1999-10-31 19:54   ` Tom Rodman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36CD9E93.553E7BFB@pdi.com \
    --to=curtis@pdi.com \
    --cc=cygwin@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).