chiark / gitweb /
fds: Introduce pipe_cloexec()
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 27 Sep 2014 10:41:53 +0000 (11:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 2 Oct 2014 01:23:59 +0000 (02:23 +0100)
commit6a06198cde5b96686304a9814dd7aa241adcb448
tree779fbecffc7e8e2375e1f7f14c16c85d8de59437
parent56fd04e41e9985260b8c1660e299cfe051d3f260
fds: Introduce pipe_cloexec()

Replace all calls to pipe() with this new function, which checks
errors for us, and also sets both fds to close-on-exec.

There are some minor functional changes:
 * Error messages from pipe() failing are now less detailed about the
   context.  This is not important.
 * The signal self-pipe is now cloexec too.  This is at worst harmless.
 * When execing userv-ipif we rely on cloexec to close the spare
   copies of the pipe ends.
 * The stderr self-pipe spare writing end is redudantly made cloexec
   even though it is about to be closed shortly afterwards.

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