From: Clemens Buchacher Date: Sat, 14 Apr 2012 22:06:06 GMT Subject: Re: [PATCH] git-daemon wrapper to wait until daemon is ready Message-ID: <20120414220606.GA18137@ecki> In-Reply-To: <4F89D1C6.8090705@kdbg.org> On Sat, Apr 14, 2012 at 09:36:38PM +0200, Johannes Sixt wrote: > Am 14.04.2012 20:29, schrieb Clemens Buchacher: > > + r = read_line(proc.err, buf, sizeof(buf)); > > We have strbuf_getwholeline_fd(). Thanks. Will fix. > > + memset(&cat, 0, sizeof(cat)); > > + cat.argv = (const char **)cat_argv; > > + cat.in = proc.err; > > + cat.out = 2; > > Useless use of cat? I don't see how I could avoid cat here. I have to create a pipe first so that I can read the first line. And then I have to terminate test-git-daemon in order to start the tests. So I cannot continue reading synchronously.