[vte] app: Use utility function



commit ffedb03dbd0193b19060c4d54125eff0cd7992be
Author: Christian Persch <chpe src gnome org>
Date:   Mon Apr 27 20:49:04 2020 +0200

    app: Use utility function

 src/app/app.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/app/app.cc b/src/app/app.cc
index a284c764..7dcf940f 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -18,7 +18,6 @@
 
 #include "config.h"
 
-#include <fcntl.h>
 #include <string.h>
 #include <locale.h>
 #include <unistd.h>
@@ -266,7 +265,7 @@ private:
                  */
                 auto new_fd = int{};
                 if (*end == '=' || fd < 3) {
-                        new_fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
+                        new_fd = vte::libc::fd_dup_cloexec(fd, 3);
                         if (new_fd == -1) {
                                 g_set_error (error, G_IO_ERROR, g_io_error_from_errno(errno),
                                              "Failed to duplicate file descriptor %d: %m", fd);


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