From: Junio C Hamano Date: Fri, 01 Jul 2016 20:06:45 GMT Subject: Re: [PATCH v2 00/12] nd/icase updates Message-ID: In-Reply-To: Junio C Hamano writes: > Junio C Hamano writes: > >> Duy Nguyen writes: >> >>> The rest looks good (after your comment fixup). I see you already have >>> all the changes in your SQUASH??? commit. Do you want me to resend or >>> you will just squash this in locally? >> >> Squashing in would need to redo this into a few relevant commits, >> so it won't be "just squash this in locally" I am afraid, but let me >> try. > > Ok, there was a miniscule conflicts but otherwise the squashed > material was all coming from a single step in the original, so > I did so myself. Let's start merging the result to 'next' ;-) > > Thanks. IOW, this on top of the fixup we discussed. sideband.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sideband.c b/sideband.c index afa0136..2782df8 100644 --- a/sideband.c +++ b/sideband.c @@ -62,10 +62,7 @@ int recv_sideband(const char *me, int in_stream, int out) * * The output is accumulated in a buffer and * each line is printed to stderr using - * fwrite(3). This is a "best effort" - * approach to support inter-process atomicity - * (single fwrite(3) call is likely to end up - * in single atomic write() system calls). + * write(2) to ensure inter-process atomicity. */ while ((brk = strpbrk(b, "\n\r"))) { int linelen = brk - b; @@ -78,7 +75,7 @@ int recv_sideband(const char *me, int in_stream, int out) } else { strbuf_addf(&outbuf, "%c", *brk); } - fwrite(outbuf.buf, 1, outbuf.len, stderr); + xwrite(2, outbuf.buf, outbuf.len); strbuf_reset(&outbuf); b = brk + 1; @@ -101,7 +98,7 @@ int recv_sideband(const char *me, int in_stream, int out) if (outbuf.len) { strbuf_addf(&outbuf, "\n"); - fwrite(outbuf.buf, 1, outbuf.len, stderr); + xwrite(2, outbuf.buf, outbuf.len); } strbuf_release(&outbuf); return retval;