[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-aio
Subject:    Re: [aio] How to check error for each completed io_event ?
From:       Benjamin LaHaise <bcrl () kvack ! org>
Date:       2015-02-05 16:41:38
Message-ID: 20150205164138.GA30830 () kvack ! org
[Download message RAW]

On Thu, Feb 05, 2015 at 10:33:01AM -0600, Alireza Haghdoost wrote:
> > numevents = io_getevents(context[i], 0, queuelen, eventlist, NULL);
> >
> I am a little bit more confuse when I realized that eventlist[0].res
> is equal to -28 in the case of failure of first completed event. What
> does -28 means ?
> eventlist[0].res suppose to return number of byte that has been
> read/write. In the case of failure, I think it should return -1
> according to read(2)/write(2) man pages and set appropriate errno
> 
> Can someone here help me on this ?

The error is a negative value of the errno stored in res.  Since there are 
many possible events, they can't set errno.  -28 == -ENOSPC.

		-ben

> --Alireza

-- 
"Thought is the essence of where you are now."

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org.  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic