Hacker News new | ask | show | jobs
by caf 2847 days ago
Good example.

The errors are just because you need to check for EAGAIN or EWOULDBLOCK when read() returns -1, and not bail out when that happens.