git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Douglas Graham <douglas.graham@ericsson.com>
To: Jeff King <peff@peff.net>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: RE: O_NONBLOCK: should I blame git or ssh?
Date: Mon, 9 Sep 2019 15:52:57 +0000	[thread overview]
Message-ID: <BN8PR15MB302506328B68B266FD0835F8F0B70@BN8PR15MB3025.namprd15.prod.outlook.com> (raw)
In-Reply-To: <20190908102839.GC15641@sigill.intra.peff.net>

I think I've just figured out why my workaround works.  When ssh sets O_NONBLOCK
on stdout, it's setting it on the write side of the pipe that git created.  Nothing
else writes to that pipe, so this does not cause a problem.  Presumably, ssh itself
is able to deal with writing to a non-blocking "file description". When ssh sets
O_NONBLOCK on stderr, it's setting it on the pipe created by Jenkins.  But that's
the same pipe that my workaround program does the select() on, so my workaround
can compensate. When I run "make | workaround", the write side of *that* pipe is
never made non-blocking, and that's the one that make itself writes to.

Ok, I think all mysteries are solved, but I'm still not sure what the moral of
the story is. This seems like it could lead to some really difficult to debug
problems, but it's not clear to me what the right long-term fix should be. For
now, we'll just leave our workaround in place and think about tweaking our
makefile to redirect git's stderr.


      parent reply	other threads:[~2019-09-09 15:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-07 23:50 O_NONBLOCK: should I blame git or ssh? Douglas Graham
2019-09-08 10:28 ` Jeff King
2019-09-08 14:18   ` Douglas Graham
2019-09-09 17:04     ` Jeff King
2019-09-09 15:52   ` Douglas Graham [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BN8PR15MB302506328B68B266FD0835F8F0B70@BN8PR15MB3025.namprd15.prod.outlook.com \
    --to=douglas.graham@ericsson.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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