server: reopen standard streams to /dev/null
authorAndreas Economides <andreas.economides@nutanix.com>
Wed, 18 Aug 2021 12:19:51 +0000 (13:19 +0100)
committerAndreas Economides <andreas.economides@nutanix.com>
Wed, 18 Aug 2021 16:43:59 +0000 (16:43 +0000)
commitd6096098275fb0bc4331b40a6d6f6f82d11c7fc1
treee18e42293bcb49fb8e3f21c33bf0f8739aebf88c
parentdf9e8b65a52fdab5a1ac48847c44d7201faa3cf1
server: reopen standard streams to /dev/null

For some custom ioengines (see https://github.com/spdk/spdk/issues/1118),
it's not trivial to suppress output to stdout and stderr, so they would
write to some other file descriptor fio had opened - which is bad.

This change ensures that fd's 0, 1, and 2 (stdin, stdout, stderr) are
always valid and can be used without any unintended consequences.

Signed-off-by: Andreas Economides <andreas.economides@nutanix.com>
server.c