On 07/12/2020 09:43, Corinna Vinschen wrote:
On Dec 4 10:35, Jeremy Drake via Cygwin-patches wrote:
On Fri, 4 Dec 2020, Corinna Vinschen via Cygwin-patches wrote:
I'm not happy about a new CYGWIN option.
Wouldn't it make sense, perhaps, to switch to CREATE_DEFAULT_ERROR_MODE
for all non-Cygwin processes by default instead?
I agree.
Cygwin calls SetErrorMode(), so we need to use this flag to prevent that
non-default behaviour being inherited by processes started with
CreateProcess().
In fact, my first iteration was to set that flag unconditionally (relying
on the fact that SetErrorMode is called extremely early in Cygwin process
startup rather than only setting it for non-Cygwin processes), but I
received feedback that it would be better to put it behind an option:
https://github.com/msys2/msys2-runtime/pull/18#issuecomment-723683606
I don't really understand what that comment is saying. If Git for
Windows doesn't want the default SetErrorMode(), it should change it itself.
(The same executable not started by Cygwin will get the default error
mode in any case).
Jon, thoughts on that as GDB maintainer?
I don't think this actually interacts with gdb.
gdb either CreateProcess() with DEBUG_PROCESS (which presumably
overrides that flag) or attaches to an existing process (possibly due to
being configured as a JIT debugger).