Restore SEM_FAILCRITICALERRORS [was: Aren't Windows System Error popups meant to be disabled in Cygwin?]

David Allsopp david@tarides.com
Mon Feb 5 20:20:26 GMT 2024


On Sat, 3 Feb 2024 at 19:25, Corinna Vinschen wrote:
> > Sorry to say that, but SetThreadErrorMode/CreateProcess don't do what we
> > want them to do.  I just tested this myself with a modified Cygwin DLL
> > (code below) and it turns out that the child process error mode is
> > the same as the parent's process error mode.  Changing the thread
> > error mode from the Cygwin default 3 (aka SEM_FAILCRITICALERRORS |
> > SEM_NOGPFAULTERRORBOX) to 0 doesn't have any effect.
> > [...etc.]

Oh dear, what a mess!

> MSYS2 has introduced the environment variable option CYGWIN=winjitdebug.
> I backported this patch now.  So default is back to propagating Cygwin's
> error mode and if you want to reset the error mode of a non-Cygwin child
> process back to OS default, just set the option, for instance, like
> this:
>
>   $ CYGWIN=winjitdebug env <your-non-Cygwin.exe>
>
> This patch will be in Cygwin 3.5.1.  For the time being, it will be
> available in the next test release cygwin-3.6.0-0.28.g918c3eda4176 as
> well.

This completely fixes it for us, thank you very much

Thanks,


David


More information about the Cygwin mailing list