> Assuming all I/O failures are EINTR is really, really odd, as if to say disks never fill up or fail and sockets never disconnect.
The point is to retry on EINTR and to abort completely in case of other IO failures.
assert(errno == EINTR);
continue;
is equivalent to
if (errno == EINTR)
continue;
abort();
> But somebody somewhere is reading this and thinking this is a "semantically correct pattern" (as it is introduced) and may just copy-paste it into their program.
Even if they do, it likely will not actually do any harm, it'll just kill the program instead of gracefully handle error.
The point is to retry on EINTR and to abort completely in case of other IO failures.
is equivalent to > But somebody somewhere is reading this and thinking this is a "semantically correct pattern" (as it is introduced) and may just copy-paste it into their program.Even if they do, it likely will not actually do any harm, it'll just kill the program instead of gracefully handle error.