strbuf: add strbuf_read_once to read without blocking
authorStefan Beller <redacted>
Wed, 16 Dec 2015 00:04:08 +0000 (16:04 -0800)
committerJunio C Hamano <redacted>
Wed, 16 Dec 2015 20:06:08 +0000 (12:06 -0800)
commitb4e04fb66e87a027c5f9c96bcbbba50719400169
tree3a5eee3f453bf76dc8c3e0da0eaefba3817b76c2
parent1079c4be0b72003668df647f8a520fa137c7e158
strbuf: add strbuf_read_once to read without blocking

The new call will read from a file descriptor into a strbuf once. The
underlying call xread is just run once. xread only reattempts
reading in case of EINTR, which makes it suitable to use for a
nonblocking read.

Signed-off-by: Stefan Beller <redacted>
Signed-off-by: Junio C Hamano <redacted>
strbuf.c
strbuf.h
git clone https://git.99rst.org/PROJECT