Re: [PATCH] Refactor recv_sideband()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 14, 2016, 18:11 UTC
- Message-ID
- <xmqqa8inaben.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <alpine.LFD.2.20.1606141347310.1714@knanqh.ubzr>
Nicolas Pitre <nico@fluxnic.net> writes:
Show 5 quoted lines
> It is not buffered as it writes to stderr. And some C libs do separate > calls to write() for every string format specifier. So "%s%s%c" may end > up calling write() 3 times depending on the implementation. The example > I gave in commit ed1902ef5c is real and I even observed it with strace > back then.
I think you meant 9ac13ec9 (atomic write for sideband remote messages, 2006-10-11).
IIRC, back then we did't use to make as much use of strbuf API as we do today; if we were doing that commit today, we would be doing strbuf, I would suspect.