chiark / gitweb /
treewide: use stdio_unset_cloexec() function
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Sat, 2 Jul 2016 17:42:01 +0000 (23:42 +0600)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:13:01 +0000 (10:13 +0200)
src/basic/terminal-util.c

index fa4f60826c9821b3f26f87ac2c6a355fde8ade02..40e3c400f9adbb984b6369ba04481a96e76c37a1 100644 (file)
@@ -898,9 +898,7 @@ int make_stdio(int fd) {
 
         /* Explicitly unset O_CLOEXEC, since if fd was < 3, then
          * dup2() was a NOP and the bit hence possibly set. */
-        fd_cloexec(STDIN_FILENO, false);
-        fd_cloexec(STDOUT_FILENO, false);
-        fd_cloexec(STDERR_FILENO, false);
+        stdio_unset_cloexec();
 
         return 0;
 }