[tracker-miners: 1/2] macOS: add pipe2 fallback




commit cc655ba0f95022cf35bc6d44cb5155788fee2e24
Author: Weijia Wang <9713184+wegank users noreply github com>
Date:   Sat Aug 6 20:32:38 2022 +0200

    macOS: add pipe2 fallback

 src/libtracker-miners-common/tracker-term-utils.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miners-common/tracker-term-utils.c 
b/src/libtracker-miners-common/tracker-term-utils.c
index 0089fd3a6..3d3dd5aee 100644
--- a/src/libtracker-miners-common/tracker-term-utils.c
+++ b/src/libtracker-miners-common/tracker-term-utils.c
@@ -157,7 +157,7 @@ tracker_term_pipe_to_pager (void)
        if (!tracker_term_is_tty ())
                return FALSE;
 
-       if (pipe2 (fds, O_CLOEXEC) < 0)
+       if (g_unix_open_pipe (fds, FD_CLOEXEC, NULL) < 0)
                return FALSE;
 
        pager_command = best_pager ();
@@ -178,7 +178,7 @@ tracker_term_pipe_to_pager (void)
        close (fds[0]);
 
        if (dup2(fds[1], STDOUT_FILENO) < 0)
-               return FALSE;
+               return FALSE;
 
        close (fds[1]);
        signal_handler_id = g_unix_signal_add (SIGINT, ignore_signal_cb, NULL);


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