Not sure where to ask this question because I mostly never program on Linux, so: where do the errno's go when you issue ops on an io_uring? To the naive user (me), it looks like they simple vanish, since cqe.res is documented as being simply "-1 on error". This can't be right?
-
Show this thread
-
Replying to @cmuratori
If you're using liburing then the return code for the function call is the error code. ie: int ret = io_uring_wait_cqe_timeout(ring, &cqe, &timeout); The var "ret" can be printed with strerror to get the string of the error.
1 reply 0 retweets 0 likes -
Replying to @idoccor
No, I mean the IO ops, not the io_uring calls. Like if you issue a read, and the read fails.
1 reply 0 retweets 0 likes -
Replying to @cmuratori
Oh ya, in that case -cqe.res is the errno, like here's my abort unit test printing -cqe.res: "RunLoop::ReaderInterface error: 107 Transport endpoint is not connected"
1 reply 0 retweets 4 likes -
Replying to @idoccor
Awesome! The man pages should probably be fixed, then. But that is very good news.
1 reply 0 retweets 1 like -
Replying to @cmuratori
Yeah, I'm finding io_uring and liburing are still very immature. The docs need polishing and older but widespread kernels like 5.4 don't support basic features like timeouts.
1 reply 0 retweets 1 like
Yeah, I'm sure it's still a work in progress. But it's good to know the errno works properly, regardless.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.