[gnome-builder] pty: fix FD_CLOEXEC usage



commit f7826bc83af6a9d4c66000edc71c04848403d006
Author: Christian Hergert <chergert redhat com>
Date:   Tue Jan 23 00:24:24 2018 -0800

    pty: fix FD_CLOEXEC usage

 src/libide/util/ptyintercept.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/util/ptyintercept.c b/src/libide/util/ptyintercept.c
index 072425784..a85886cdd 100644
--- a/src/libide/util/ptyintercept.c
+++ b/src/libide/util/ptyintercept.c
@@ -116,7 +116,7 @@ pty_intercept_create_slave (pty_fd_t master_fd)
         return PTY_FD_INVALID;
 
       flags = fcntl (ret, F_GETFD, 0);
-      flags |= O_NONBLOCK | O_CLOEXEC;
+      flags |= O_NONBLOCK | FD_CLOEXEC;
 
       if (fcntl (ret, F_SETFD, flags) < 0)
         return PTY_FD_INVALID;
@@ -156,7 +156,7 @@ pty_intercept_create_master (void)
       if (master_fd == PTY_FD_INVALID && errno == EINVAL)
         {
           master_fd = posix_openpt (O_RDWR | O_NOCTTY);
-          new_flags |= O_CLOEXEC;
+          new_flags |= FD_CLOEXEC;
           if (master_fd == -1)
             return PTY_FD_INVALID;
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]