Non-blocking I/O and EWOULDBLOCK vs. EAGAIN
John Quarterman
jsq at ut-sally.UUCP
Mon Jul 22 04:06:36 AEST 1985
as essentially adopted 4.2BSD-style
non-blocking I/O, rather than System V-style non-blocking I/O. The System V
Interface Definition says that System V will be changed to match the
/usr/group standard.
However,
1) as the S5ID states, this may break existing code as it isn't
compatible with existing System V implementations.
and
2) it's not compatible with 4.2BSD, either, because they return
EAGAIN if a non-blocking operation would have blocked had the
descriptor been in non-blocking mode, rather than EWOULDBLOCK.
Is there a good reason for constructing a new specification, incompatible
with *all* existing systems, rather than adopting the existing 4.2BSD
facility which provides the same functionality and merely uses a different
error code? "The committee didn't want to add a new error code" is an
extremely bad reason, as they have already added new error codes for the
benefit of file locking. UNIX error codes are far too overloaded already;
the problem should not be compounded.
Guy Harris
More information about the Mod.std.unix
mailing list