| Previous | Next |
| ENOSYS | EPROTOTYPE |
EWOULDBLOCK
EWOULDBLOCK belongs to the nonblocking I/O contract. It means the operation could not complete immediately without blocking the caller. This is a readiness and state condition, not data corruption and not proof that the peer has closed the connection.
Event-driven code should treat it like a normal backpressure signal: stop the current read or write attempt, preserve the pending buffer state, and wait for the next appropriate readiness notification. A readiness event is not a guarantee that a later syscall cannot still return EWOULDBLOCK, because another thread, another consumer, socket buffer changes, or edge-triggered draining can change the state before the call.
Diagnostics to keep
- Whether the descriptor is nonblocking and which event mask was last observed.
- The number of bytes already transferred before the error.
- Whether the code uses level-triggered or edge-triggered polling.
- Whether
EAGAINandEWOULDBLOCKare handled together in the portability layer.
Linux read(2) · Linux send(2) · Linux errno(3) · Linux UAPI errno definitions
Looking for a different code? Search another status or error code.