Use non-blocking writes for clients

We may have console clients that are remote, and so the write() to those
clients may block.

Since we're single-threaded, that block will delay output to all other
clients (and read from the UART).

This change uses nonblocking IO for the client sockets, and a small
buffer to handle writes that would have blocked.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
1 file changed