Home > Mobile >  How to get IO errors in `O_NONBLOCK`ed code
How to get IO errors in `O_NONBLOCK`ed code

Time:12-31

Once i have enabled O_NONBLOCK,

Then calling the non-blocking function, but after it returns,

Some IO error happens, so how may i get to know, that some bad has happened, and how to handle it,

Thanks

CodePudding user response:

You get the errors when they are ready for you to see them and you are ready to receive them.

sooner or later you end up calling read() or close() or whatever and that will give you the error.

  • Related