Re: [PATCH] Refactor recv_sideband()
Lukas Fleischer <lfleischer@lfos.de> writes:
Show 6 quoted lines
> 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.