X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C72AC3857C5E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1706880622;
	bh=wCM6d4nFz+XguAs7/Ibq/J7/Mh7Uo3MHMZMMDHcG0a4=;
	h=References:In-Reply-To:Date:Subject:To:Cc:List-Id:
	 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
	 From:Reply-To:From;
	b=JBwINrHd/LFMOqHE68tCMfvPQvEwPnjPT2J4onuRo9FnI0xKteMevc+by0Heok4GI
	 0IEEinc6XRBuR5s9PEX8mWHfcYPY2yHwSQN5wJJT3P4h2REcZkuNqfyK7hcGHZNQpy
	 WIVM56xyHae0wzRwc6xgFK0YnnVcbOl7sHQ7fzic=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6EA563857B98
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6EA563857B98
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706880536; cv=none;
 b=EXD2yVcCbv5JoFpUshDPQtxwjL0gZEkbuFP1rdXeheen90YEaMoo9UJh41OVi4Xre3k5r+qpQoSc1rd5ezy/vdvT0JYdbOdxJb94G5S/5JkRBbteNxVcCiB27lFq5lPoIaSshfloT5FKuHQ3QclCYFJMSpCnh7stfUBCHxi0xQM=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1706880536; c=relaxed/simple;
 bh=R4ibiQeKXn17hGkwLGqXoeksI9L1HBy5UZp1jl2r5Gc=;
 h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To;
 b=w8QZYgufdTtlfQtenxzRvbbX46Y1teGhQmYiKvtPn26sIRJnefhQTvgKOYDd9fomkAonmMaSL8CrNChhbar3ux5QFf8NC5Y5nCue2iWT46dU+sIVXBXyENmF7Drtpm6IDFhParYF7H0RI4mEUJ9eoNselNBd64aWLYDnS9n4vfE=
ARC-Authentication-Results: i=1; server2.sourceware.org
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1706880533; x=1707485333;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=tE3QHxRLWSW2X9WfTwxGwon7YKhD7/EuqB4WusUvewE=;
 b=Nc5d3uqN31lMJBrpzih6zW4HpuRiCkuoa4vzeERQnwX3bt09WGMQm19vIWZbbOZgga
 aXQMFZzNGpkT4c8PgYll6KpTLWXYsxsjtQI5t7iV0Ggn/TO7nJCMRjrsQo247i4L6BME
 qvCQCcA5ASQu0my+Mg3JQjpaOr09VHPobKIj7N8uzBBYQaJvKTRWJem2CCzWdnzQ1lsg
 55M4x9YUKFCp2K3Ppgga5kFmiO8UWrsaVxGj03clL7DQWjBV+6VEX0GlHl02WP+dnYEJ
 1wRQiYhUD4YIhHvBFUYrKDEjDaxRqMZeLhPMyA8udYGmDAJozZI89/RipUoXsaZE1RTa
 mZHQ==
X-Gm-Message-State: AOJu0YzsL+qHBLj/L5NzTZtY24IY+oI9/GAxN33rQj/4Rn6wDw+5ESW7
 FMS60k6CUUWBwjtK4/ltLE46qV00KC+wLy2jKdNpwDe4qQRSctSKNf/9lgdT7QvIBK8LCI8Dx7I
 84+ZTdjaTSrp7KQSqhHq3aaA1UFuaqn7E3Qkr78oKxs7/+sgt
X-Google-Smtp-Source: AGHT+IFXSd4clg8lfsKAjWf74Kn1X+dMK9Xcb7Oo1I0xv6JOHmFO5qIms0RZKs7ZUp7Z0EMZG3tB+ND1KZhsKzBYHZ4=
X-Received: by 2002:a17:907:960c:b0:a36:5e44:a2dd with SMTP id
 gb12-20020a170907960c00b00a365e44a2ddmr1991968ejc.5.1706880533082; Fri, 02
 Feb 2024 05:28:53 -0800 (PST)
MIME-Version: 1.0
References: <CAJQQdJiOEduFeAthZ+q+LNXV33aJOhAXqq3sCaxdCqRpAjVmvA@mail.gmail.com>
 <CAB8Xom-PnumWSLoDFgERXA4GX0zotQiKFvi_wL7Bvsv133WAmw@mail.gmail.com>
 <CAJQQdJhzSNZ5dG254g5dv_AuWRxt+R-HLdiCPTkCNv=o+4PVeQ@mail.gmail.com>
 <ZbtsBD2IKYtH-duQ@calimero.vinschen.de>
 <CAJQQdJhS3QgJe_KsfGof_6XM6cwtNRkbPQPR32-JaKCu8_8KEA@mail.gmail.com>
 <ZbzmLRByzmDJxUcb@calimero.vinschen.de>
In-Reply-To: <ZbzmLRByzmDJxUcb@calimero.vinschen.de>
Date: Fri, 2 Feb 2024 13:28:16 +0000
Message-ID: <CAJQQdJhwxBTP61zz_OtE5+OnokanLF+zMMEFeCLQRcOy6BsJDA@mail.gmail.com>
Subject: Re: Restore SEM_FAILCRITICALERRORS [was: Aren't Windows System Error
 popups meant to be disabled in Cygwin?]
To: cygwin@cygwin.com
Cc: Corinna Vinschen <corinna-cygwin@cygwin.com>
X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS,
 TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: David Allsopp via Cygwin <cygwin@cygwin.com>
Reply-To: David Allsopp <david@tarides.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

On Fri, 2 Feb 2024 at 12:55, Corinna Vinschen via Cygwin wrote:
> On Feb  2 09:43, David Allsopp via Cygwin wrote:
> > On Thu, 1 Feb 2024 at 10:02, Corinna Vinschen via Cygwin
> > <cygwin@cygwin.com> wrote:
> > >
> > > The behaviour changed in 2020
> > >
> > > https://cygwin.com/git/?p=newlib-cygwin.git;a=commitdiff;h=21ec498d7f912
> > >
> > > not without a discussion
> > >
> > > https://cygwin.com/pipermail/cygwin-patches/2020q4/010870.html
> >
> > Aha, thank you! (congrats on the 3.5 release, in passing, btw).
> > Definitely not a regression, then (subject edited).
> >
> > However, this patch came from MSYS2, and subsequently they seem to
> > have found it problematic for the same reason as me
> > (https://github.com/msys2/msys2-runtime/pull/18#issuecomment-810897624)
> > and have just recently reintroduced the flag
> > (https://github.com/msys2/msys2-runtime/commit/7616b8a2e0ffcf068b47e1a66bbb1dbd7d9b5c50)
> > to control it.
> >
> > The reasoning in
> > https://cygwin.com/pipermail/cygwin/2006-August/150081.html seems as
> > valid now as it did in 2006.
> >
> > Is it possible to revisit having the flag, or even just reverting the behaviour?
> >
> > FWIW, it's been "hurting" us over in OCaml-land since zstd support was
> > added roughly a year ago - configure can tell us that mingw-w64's zstd
> > is available, but woe betide us if we run the test program to see if
> > it actually works, but the user forgot to add the sys-root into PATH,
> > because at that point the CI system is down...
>
> I'm sympathetic, and personally I would prefer to revert the patch and
> stick to SEM_FAILCRITICALERRORS by default.
>
> The question is this: Why does, apparently, everybody expect Cygwin to
> do the "right thing", with different definitions of "right", when in
> fact the executable in question can easily call SetErrorMode by itself?

The executable can't, though (at least, I'm not aware that it can)?
The DLL not found case is being triggered by the loader, before the
entrypoint code is running?

I did have a look to see if there are manifest flags or some such
which can be set to indicate this, but it does seem to be the
responsibility of the caller, coupled with a "best practice"
recommendation on MSDN to call SetErrorMode (as Cygwin is of course
doing).

The whole system with it feels like unfortunate Windows legacy, but I
guess the behaviour vastly predates Event Viewer, etc., and slightly
better (and non-blocking) ways of reporting loader errors. Perils of a
nearly 40 year old API, if not OS <shrugs>

Thanks,


David

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
