basic/fd-util: introduce stdio_unset_cloexec() function
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Sat, 2 Jul 2016 17:38:47 +0000 (23:38 +0600)
committerAlexander Kuleshov <kuleshovmail@gmail.com>
Sat, 2 Jul 2016 17:38:47 +0000 (23:38 +0600)
commit3b9a1d87cc468cfcd6f9ddfd98ac389fa5840f10
tree59c7c06a75e9f57502b6ce2e38f4cc7b95ce34f6
parent563a69f480180378ac109a4125b565ce4f394979
basic/fd-util: introduce stdio_unset_cloexec() function

There are some places in the systemd 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