This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Minor O_CLOEXEC optimization, "regression" fix
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: jan dot kratochvil at redhat dot com, ktietz at redhat dot com, gdb-patches at sourceware dot org
- Date: Wed, 09 Oct 2013 20:28:54 +0300
- Subject: Re: [patch] Minor O_CLOEXEC optimization, "regression" fix
- Authentication-results: sourceware.org; auth=none
- References: <20131008183214 dot GB27355 at host2 dot jankratochvil dot net> <87li23fsym dot fsf at fleche dot redhat dot com> <20131009131016 dot GA1603 at host2 dot jankratochvil dot net> <83hacqqsx7 dot fsf at gnu dot org> <87ob6ybcdc dot fsf at fleche dot redhat dot com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Tom Tromey <tromey@redhat.com>
> Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, ktietz@redhat.com,
> gdb-patches@sourceware.org
> Date: Wed, 09 Oct 2013 11:08:47 -0600
>
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
>
> Eli> Please don't do that. On latest versions of Windows, the runtime
> Eli> library functions tend to invoke the "invalid parameter handler" in
> Eli> these cases, which more often than not will crash the program.
>
> The status quo ante was to do the call but not check for EINVAL.
> So the bug, if there is one, is already there.
> Can you check?
I could check, if I know what to check.
This patch confused me: it tests whether O_CLOEXEC is zero, which it
is on Windows, so there should be no need to try "e" at all.
Therefore, I don't understand why this is still an issue. What am I
missing?