chiark / gitweb /
fds: Make many fds nonblocking
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 27 Sep 2014 12:56:35 +0000 (13:56 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 29 Sep 2014 15:20:02 +0000 (16:20 +0100)
commit40d66380a56651751c7aa8fc46aca4d0671243ba
tree02ff3e985d050e5dff6512840b3e73d1224a8766
parent9b89d0e837d6ca1681bf49e47c114b3b39762cb7
fds: Make many fds nonblocking

Introduce iswouldblock to cope with POSIX not specifying which of
EAGAIN or EWOULDBLOCK you get).  In various subsystems, make more fds
nonblocking and handle errors appropriately.  Specifically:

* Logging self-pipe reading end.
* Signal self-pipe reading end.
* SLIP both ends.  Fixing the writing end involves breaking out
  a new function slip_write.
* tun's network interface fd.

In various of these we add code to handle EINTR, too.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
log.c
process.c
slip.c
tun.c
util.h