Re: [PATCHv3 03/13] xread_nonblock: add functionality to read from fds nonblockingly
- From
Jacob Keller <jacob.keller@gmail.com>
- Date
- Sep 22, 2015, 06:26 UTC
- Message-ID
- <CA+P7+xpWPShFWokrKYsJ13dOnugaJAg9FhfEoxwi_wwscik=CQ@mail.gmail.com>
- In-Reply-To
- <xmqqsi6771r2.fsf@gitster.mtv.corp.google.com>
On Mon, Sep 21, 2015 at 5:10 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
>> This wrapper just restarts on EINTR, but not on EAGAIN like xread >> does. This gives less guarantees on the actual reading rather than >> on returning fast. > > The last sentence is a bit hard to parse, by the way. >
I'd imagine something more like:
Provide a wrapper to read(), similar to xread(), that restarts on EINTR but not EAGAIN (or EWOULDBLOCK). This enables the caller to handle polling itself, possibly polling multiple sockets or performing some other action.
Regards, Jake