As in the title what does EAGAIN mean?
EWOULDBLOCK means that the socket send buffer is full when sending, or that the socket receive buffer is empty when receiving. You are supposed to use select() to detect when these conditions become false.
errno The value in errno is significant only when the return value of the call indicated an error (i.e., -1 from most system calls; -1 or NULL from most library functions); a function that succeeds is allowed to change errno. The value of errno is never set to zero by any system call or library function.
EAGAIN is often raised when performing non-blocking I/O. It means "there is no data available right now, try again later".
It might (or might not) be the same as EWOULDBLOCK
, which means "your thread would have to block in order to do that".
Using man 2 intro | less -Ip EAGAIN
:
35 EAGAIN Resource temporarily unavailable. This is a temporary condi- tion and later calls to the same routine may complete normally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With