From: Junio C Hamano Date: Tue, 14 Jun 2016 19:16:17 GMT Subject: Re: [PATCH] Refactor recv_sideband() Message-ID: In-Reply-To: <146593150503.20857.6674861809731777501@typhoon.lan> Lukas Fleischer writes: > One possible solution is using strbuf and constructing the message as we > did before. However, that still relies on fprintf() only calling write() > once per format specifier. While that is probably true for all existing > implementations, I don't think it is guaranteed by some standard. > Shouldn't we always use the stderr stream when printing error messages > instead, especially when we care about thread safety? Or you can always write(2) to fd=2 and that is safe, too.