public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-apps@cygwin.com
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH setup] When in unattended mode, ignore attempts to close via GUI
Date: Sun, 19 Dec 2021 21:22:55 +0000	[thread overview]
Message-ID: <20211219212255.57881-1-jon.turney@dronecode.org.uk> (raw)

Perhaps this should be controlled by a separate option, but making setup
non-interactive seems like a reasonable fit with the intent of
'--quiet-mode'.

This doesn't stop the installer being killed by TerminateProcess().

Addresses: https://cygwin.com/pipermail/cygwin/2021-November/250079.html
---
 propsheet.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/propsheet.cc b/propsheet.cc
index 00b2ad8..742e5da 100644
--- a/propsheet.cc
+++ b/propsheet.cc
@@ -161,6 +161,8 @@ static LRESULT CALLBACK PropSheetWndProc (HWND hwnd, UINT uMsg,
       if (wParam != 2)
 	break;
     areyousure:
+      if (unattended_mode == unattended)
+        return 0;
       if (mbox(hwnd, IDS_CONFIRM_EXIT, MB_YESNO) == IDNO)
 	return 0;
       break;
-- 
2.34.1


                 reply	other threads:[~2021-12-19 21:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20211219212255.57881-1-jon.turney@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-apps@cygwin.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).