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>
Wed, 8 Oct 2014 17:25:19 +0000 (18:25 +0100)
commit4be5f50c8dff5d4705f4b15b0ea1504b9751257a
treef4bf194a03c7a4303f2a6c44d0700807241badce
parentf54d5adadd831fd0fa55d70d3aaffe60636818f5
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.  We have to set these nonblocking after reading
  the confiramation byte.
* 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>
squash! fds: Make many fds nonblocking

userv not til later
log.c
process.c
slip.c
tun.c
util.h