This is behavior what some programs expect and what Linux does. For
example nginx expects EAGAIN when sending messages to /var/run/log,
which it connects to with O_NONBLOCK. Particularly with nginx the
problem is magnified by the fact that a ENOBUFS on send(2) is also
logged, so situation creates a log-bomb - a failed log message
triggers another log message.
Details
Details
- Reviewers
markj cem mjg - Group Reviewers
network - Commits
- rG65572cade35a: unix/dgram: return EAGAIN instead of ENOBUFS when O_NONBLOCK set
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
I think this is probably ok. EAGAIN is the usual error value for this case. I thought this would break our syslog(3), which explicitly checks for ENOBUFS, but it uses a blocking socket.