git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Clemens Buchacher <drizzd@aon.at>
To: Johannes Sixt <j6t@kdbg.org>
Cc: "Zbigniew Jędrzejewski-Szmek" <zbyszek@in.waw.pl>,
	git@vger.kernel.org, gitster@pobox.com,
	"Jeff King" <peff@peff.net>
Subject: Re: [PATCH] git-daemon wrapper to wait until daemon is ready
Date: Sun, 15 Apr 2012 21:32:42 +0200	[thread overview]
Message-ID: <20120415193242.GA1960@ecki> (raw)
In-Reply-To: <4F8B0158.4040407@kdbg.org>

On Sun, Apr 15, 2012 at 07:11:52PM +0200, Johannes Sixt wrote:
> 
> But reading the first line in this way needs a few assumptions to be true:
> 
> - git-daemon does not write an incomplete line and then waits.

Yes. One way to avoid that assumption would be a timeout.

> - git-daemon does not write more than one line, because xread() happily
> reads everything it can get. Your implementation differs from the old
> version because the shell's 'read' is required to read no more than one
> line, i.e., to read byte-wise from the pipe until it sees the LF.

The strbuf_getwholeline_fd implementation calls xread(fd, buf, 1),
reading only one byte at a time. It does not try to read beyond the
newline.

  reply	other threads:[~2012-04-15 19:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-14 18:29 [PATCH] git-daemon wrapper to wait until daemon is ready Clemens Buchacher
2012-04-14 18:32 ` [PATCH] t5570: use explicit push refspec Clemens Buchacher
2012-04-14 23:40   ` Junio C Hamano
2012-04-15  0:11     ` Clemens Buchacher
2012-04-15 19:20       ` Junio C Hamano
2012-04-15 19:52         ` Clemens Buchacher
2012-04-15 20:18           ` Junio C Hamano
2012-04-14 18:43 ` [PATCH] git-daemon wrapper to wait until daemon is ready Ben Walton
2012-04-14 19:00   ` Clemens Buchacher
2012-04-14 19:16     ` [PATCH v2] " Clemens Buchacher
2012-04-14 19:36 ` [PATCH] " Johannes Sixt
2012-04-14 22:06   ` Clemens Buchacher
2012-04-15 11:53     ` [PATCH v3] " Clemens Buchacher
2012-04-16 15:46       ` Zbigniew Jędrzejewski-Szmek
2012-04-19 15:00       ` Junio C Hamano
2012-04-15 17:11     ` [PATCH] " Johannes Sixt
2012-04-15 19:32       ` Clemens Buchacher [this message]
2012-04-15 19:57         ` Johannes Sixt

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=20120415193242.GA1960@ecki \
    --to=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=peff@peff.net \
    --cc=zbyszek@in.waw.pl \
    /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).