eio.c bug - use of errno without testing result

Jonas H. jonas at lophus.org
Fri Oct 29 15:58:21 CEST 2010

On 10/29/2010 03:40 PM, Micheil Smith wrote:
> Given something like a call to EIO_OPEN, how should we be checking for an error

After a glimpse at libeio's source: I think you have to check the 
'result' member of the request that e.g. `eio_open` returns:

case EIO_OPEN:
   eq->result = open(req->ptr1, req->int1, (mode_t)req->int2);

So 'result' would be -1 if open failed (according to the standard 'read' 

More information about the libev mailing list