This can have
unintended consequences: if the buffer is full but the underlying file
descriptor is ready for a character, the next write will cause a
buffer flush, and if the size of the buffer is greater than the number
of characters that the file can receive without blocking, blocking
might still occur.  Unless the port will carry out a partial flush in
such a case, this procedure will therefore generally work best with
unbuffered ports (say by using the open-file, fdopen or duplicate-port
procedure with 