Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off default Windows error reporting by default #35

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

dscho
Copy link
Collaborator

@dscho dscho commented Mar 31, 2021

As reported in msys2/MSYS2-packages#2414 (comment), v3.2.0 of the Cygwin runtime has a pretty disruptive new behavior where it shows a message box e.g. when a DLL is missing (it used to write that error message to stderr instead).

Let's reinstate the old behavior, allowing to opt-in to the new behavior (which is desired e.g. when debugging using a registered JIT debugger) via the winjitdebug flag in the environment variable MSYS.

This implements what we talked about here, at long last.

Cc: @lazka @jeremyd2019

In msys2#18, we discussed a change
that would allow default Windows error handling of spawned processes to
kick in (such as registered JIT debuggers). We even agreed that it would
make sense to hide this functionality behind a flag, `winjitdebug`.

However, when this got upstreamed as 21ec498 (cygwin: use
CREATE_DEFAULT_ERROR_MODE in spawn, 2020-12-09), that flag was deemed
unnecessary.

But it would appear that it _is_ necessary: As reported in
msys2/MSYS2-packages#2414 (comment)
this new behavior is pretty disruptive e.g. in CI scenarios.

So let's introduce that `winjitdebug` flag (settable via the environment
variable `MSYS`) at long last.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho marked this pull request as ready for review March 31, 2021 10:14
@dscho
Copy link
Collaborator Author

dscho commented Mar 31, 2021

I just verified that this fix works.

@lazka
Copy link
Member

lazka commented Mar 31, 2021

lgtm

@dscho dscho merged commit c3de1fd into msys2:msys2-3_2_0-release Mar 31, 2021
@dscho dscho deleted the winjitdebug branch March 31, 2021 13:12
dscho added a commit to dscho/MSYS2-packages that referenced this pull request Mar 31, 2021
Unless `MSYS` contains `winjitdebug`, with this change we won't show
that annoying message box e.g. when a DLL is missing.

This is essentially forwarding
msys2/msys2-runtime#35 to MSYS2-packages.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
atomlong pushed a commit to atomlong/MSYS2-packages that referenced this pull request Apr 14, 2021
Unless `MSYS` contains `winjitdebug`, with this change we won't show
that annoying message box e.g. when a DLL is missing.

This is essentially forwarding
msys2/msys2-runtime#35 to MSYS2-packages.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants