From: Stefan Beller <sbeller@google.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Johannes Sixt <j6t@kdbg.org>, Junio C Hamano <gitster@pobox.com>,
"git@vger.kernel.org" <git@vger.kernel.org>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: O_NONBLOCK under Windows (was: git.git as of tonight)
Date: Wed, 4 Nov 2015 12:07:25 -0800 [thread overview]
Message-ID: <CAGZ79kZk-oAcdVNHsFe_cRhR+TuGi8RqLYigHajC9KJu7ATJJw@mail.gmail.com> (raw)
In-Reply-To: <563A63BA.9020407@web.de>
On Wed, Nov 4, 2015 at 11:59 AM, Torsten Bögershausen <tboegi@web.de> wrote:
> On 11/04/2015 12:00 AM, Stefan Beller wrote:
>> On Tue, Nov 3, 2015 at 1:03 PM, Johannes Sixt <j6t@kdbg.org> wrote:
>>
> The #ifdef assumes that Windows never will have O_NONBLOCK/F_GETFL)
>
> Does the following make more sense ?
> #if defined (O_NONBLOCK) && defined (F_GETFL)
>
> Or may be:
> #ifndef NO_O_NONBLOCK
>>> #ifndef GIT_WINDOWS_NATIVE
>>> int flags = fcntl(fd, F_GETFL);
>>> if (flags < 0)
>>> warning("Could not get file status flags, "
>>> "output will be degraded");
>>> else if (fcntl(fd, F_SETFL, flags | O_NONBLOCK))
>>> #endif
>>> warning("Could not set file status flags, "
>>> "output will be degraded");
>>> }
>>>
Reading Junios answer to the resent patch[1], I am currently debating
if this is the right way to go anyway. As Junio points out, this is
not a warning
but rather a critical issue such that we'd maybe rather die(...) than
just warning(...),
which would make the discussion about the correct condition in the #ifdef moot.
[1] [PATCHv3 02/11] run-command: report failure for degraded output just once
next prev parent reply other threads:[~2015-11-04 20:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 2:58 git.git as of tonight Junio C Hamano
2015-11-02 21:15 ` Johannes Sixt
2015-11-02 22:16 ` Junio C Hamano
2015-11-02 23:06 ` Stefan Beller
2015-11-03 6:34 ` Johannes Sixt
2015-11-03 17:05 ` Junio C Hamano
2015-11-03 18:18 ` Stefan Beller
2015-11-03 21:03 ` Johannes Sixt
2015-11-03 23:00 ` Stefan Beller
2015-11-04 19:59 ` O_NONBLOCK under Windows (was: git.git as of tonight) Torsten Bögershausen
2015-11-04 20:07 ` Stefan Beller [this message]
2015-11-04 22:43 ` [PATCH 0/2] Missing " Stefan Beller
2015-11-04 22:43 ` [PATCH 1/2] run-parallel: rename set_nonblocking to set_nonblocking_or_die Stefan Beller
2015-11-05 6:07 ` Torsten Bögershausen
2015-11-05 6:14 ` Junio C Hamano
2015-11-05 6:19 ` Junio C Hamano
2015-11-05 6:58 ` Jeff King
2015-11-04 22:43 ` [PATCH 2/2] run-parallel: Run sequential if nonblocking I/O is unavailable Stefan Beller
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=CAGZ79kZk-oAcdVNHsFe_cRhR+TuGi8RqLYigHajC9KJu7ATJJw@mail.gmail.com \
--to=sbeller@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=johannes.schindelin@gmx.de \
--cc=tboegi@web.de \
/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 NNTP newsgroup(s).