redirect unused fds to /dev/null in pipestream
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 4 Jan 2018 16:35:48 +0000 (17:35 +0100)
committerPhilipp Gesang <philipp.gesang@intra2net.com>
Tue, 14 Aug 2018 14:53:34 +0000 (16:53 +0200)
commitff5191e67b68c6ab74d126c6441922f636945eb1
tree2576f2fa142f059d9388a5e83700e9f17b14a002
parentad4490f1cee6c48f81af20b691e2784b00e25286
redirect unused fds to /dev/null in pipestream

Closing an fd like stdout and stderr will cause EBADF on access
which may not be handled in a child process. Thus redirect them
to /dev/null if the user requests that their output be ignored.
src/pipestream.cpp
test/test_pipestream.cpp