On 18.12.15 04:13, Jeff King wrote:
> On Thu, Dec 17, 2015 at 09:42:01PM +0100, Torsten Bögershausen wrote:
>
>>> Or do you mean to insert another continue in here?
>> I was thinking that we run into similar loop as before:
>> read() returns -1; errno = EAGAIN /* No data to read */
>> poll()
On Fri, Dec 18, 2015 at 09:50:46AM +0100, Torsten Bögershausen wrote:
> >> So the code would look like this:
> >>
> >>if (!poll(, 1, -1))
> >> return -1;
> >
> > That changes the semantics of the function. The poll() is just a
> > convenience to avoid spinning. If it fails, with
On Thu, Dec 17, 2015 at 12:12 PM, Torsten Bögershausen wrote:
> On 16.12.15 01:04, Stefan Beller wrote:
>> The man page of read(2) says:
>>
>> EAGAIN The file descriptor fd refers to a file other than a socket
>>and has been marked nonblocking (O_NONBLOCK), and the read
On Thu, Dec 17, 2015 at 12:42 PM, Torsten Bögershausen wrote:
> On 17.12.15 21:22, Stefan Beller wrote:
>> On Thu, Dec 17, 2015 at 12:12 PM, Torsten Bögershausen wrote:
>>> On 16.12.15 01:04, Stefan Beller wrote:
The man page of read(2) says:
EAGAIN
On 16.12.15 01:04, Stefan Beller wrote:
> The man page of read(2) says:
>
> EAGAIN The file descriptor fd refers to a file other than a socket
>and has been marked nonblocking (O_NONBLOCK), and the read
>would block.
>
> EAGAIN or EWOULDBLOCK
>The file descriptor fd
On 17.12.15 21:22, Stefan Beller wrote:
> On Thu, Dec 17, 2015 at 12:12 PM, Torsten Bögershausen wrote:
>> On 16.12.15 01:04, Stefan Beller wrote:
>>> The man page of read(2) says:
>>>
>>> EAGAIN The file descriptor fd refers to a file other than a socket
>>>and has been
On Tue, Dec 15, 2015 at 04:04:07PM -0800, Stefan Beller wrote:
> If we get an EAGAIN or EWOULDBLOCK the fd must have set O_NONBLOCK.
> As the intent of xread is to read as much as possible either until the
> fd is EOF or an actual error occurs, we can ease the feeder of the fd
> by not spinning
On Thu, Dec 17, 2015 at 09:42:01PM +0100, Torsten Bögershausen wrote:
> > Or do you mean to insert another continue in here?
> I was thinking that we run into similar loop as before:
> read() returns -1; errno = EAGAIN /* No data to read */
> poll() returns -1; errno = EAGAIN /* poll failed. If
On Thu, Dec 17, 2015 at 12:51:08PM -0800, Stefan Beller wrote:
> > poll() returns -1; errno = EAGAIN /* poll failed. If the fd was OK, the
> > failure may be temporaly,
> > as much as poll() can see.
> > But most probably we
The man page of read(2) says:
EAGAIN The file descriptor fd refers to a file other than a socket
and has been marked nonblocking (O_NONBLOCK), and the read
would block.
EAGAIN or EWOULDBLOCK
The file descriptor fd refers to a socket and has been marked
10 matches
Mail list logo