]> git.ipfire.org Git - thirdparty/git.git/commit
sideband: avoid short write(2)
authorJunio C Hamano <gitster@pobox.com>
Sat, 2 Mar 2024 19:03:47 +0000 (11:03 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 2 Mar 2024 19:12:16 +0000 (11:12 -0800)
commit36ffba1c7be8d831065adab73a7a215f402ef432
tree22c47e677a476743d0979b13ade81b209818b064
parentfa6c383309557b9d2942c47b75a895ca960ad9f5
sideband: avoid short write(2)

The sideband demultiplexor writes the data it receives on sideband
with xwrite().  We can lose data if the underlying write(2) results
in a short write.

If they are limited to unimportant bytes like eye-candy progress
meter, it may be OK to lose them, but lets be careful and ensure
that we use write_in_full() instead.  Note that the original does
not check for errors, and this rewrite does not check for one.  At
least not yet.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
sideband.c