From: Bruno H. <ha...@il...> - 2002-10-03 00:17:36
|
Sam writes: > > If you rename them to READ-CHAR-SEQUENCE-NONBLOCKING and > > READ-BYTE-SEQUENCE-NONBLOCKING it's easier to understand what they do. > > But they are _not_ non-blocking! > they call read/write just once, and if that blocks, they do too. This is not a well-defined description of some semantics, because a single read() on a BSD system is not the same thing as a single read() on a SysV system. On SysV, read() can return with a "short read" spuriously, i.e. it can fill into the buffer fewer bytes than are actually available - for no visible reason. Whereas on BSD systems, your READ-BYTE-SEQUENCE-ONCE function will behave just like READ-BYTE-SEQUENCE. It's useless to introduce such variants if you cannot describe in a portable way how they behave. Bruno |