chiark / gitweb /
util: add new safe_close_above_stdio() wrapper
authorLennart Poettering <lennart@poettering.net>
Mon, 26 Feb 2018 14:41:38 +0000 (15:41 +0100)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:08 +0000 (07:59 +0200)
commitecc6cb9a01b132b88cdf20272573c142eeb84e8b
tree06761bc1094a87d041a9376307d5555550557ce1
parent89e3fcd3115e66914561b804009a3b60c574d3c9
util: add new safe_close_above_stdio() wrapper

At various places we only want to close fds if they are not
stdin/stdout/stderr, i.e. fds 0, 1, 2. Let's add a unified helper call
for that, and port everything over.
src/basic/fd-util.h
src/basic/log.c
src/basic/process-util.c
src/basic/terminal-util.c