public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH 1/1] cygwin: use CREATE_DEFAULT_ERROR_MODE in spawn
Date: Tue, 8 Dec 2020 14:43:53 +0000	[thread overview]
Message-ID: <26ef013a-d3ff-7389-c022-1b10568faf79@dronecode.org.uk> (raw)
In-Reply-To: <20201207094317.GI5295@calimero.vinschen.de>

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).

  reply	other threads:[~2020-12-08 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 21:21 Jeremy Drake
2020-12-04 12:10 ` Corinna Vinschen
2020-12-04 18:35   ` Jeremy Drake
2020-12-07  9:43     ` Corinna Vinschen
2020-12-08 14:43       ` Jon Turney [this message]
2020-12-08 19:58         ` Jeremy Drake
2020-12-09  9:25           ` Corinna Vinschen

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=26ef013a-d3ff-7389-c022-1b10568faf79@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-patches@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).