chiark / gitweb /
basic/fd-util: introduce stdio_unset_cloexec() function
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Sat, 2 Jul 2016 17:38:47 +0000 (23:38 +0600)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:13:01 +0000 (10:13 +0200)
commit4617cac05930a787af45714682402edf7dac62a9
tree53cd31863a1e5d3226b213e538b45444280200e7
parent5fe94801a659675f35b52f974942fb7ee9b8f3fc
basic/fd-util: introduce stdio_unset_cloexec() function

There are some places in the elogind which are use the same pattern:

    fd_cloexec(STDIN_FILENO, false);
    fd_cloexec(STDOUT_FILENO, false);
    fd_cloexec(STDERR_FILENO, false);

to unset CLOEXEC for standard file descriptors. This patch introduces
the stdio_unset_cloexec() function to hide this and make code cleaner.
src/basic/fd-util.c
src/basic/fd-util.h