diff options
author | Maciej S. Szmigiero <maciej.szmigiero@oracle.com> | 2023-02-19 14:45:50 +0100 |
---|---|---|
committer | Philip Withnall <pwithnall@endlessos.org> | 2023-02-21 12:42:55 +0000 |
commit | dd36ee0abfef10aec44cb00972c4de6f95b14e24 (patch) | |
tree | 433f8ae7bd03c9aa072f1d49ef72141a0386a4e6 /gio/gtestdbus.c | |
parent | 05d2a1d09757feb1aea2926ce7f205a4aa1e2d7f (diff) | |
download | glib-dd36ee0abfef10aec44cb00972c4de6f95b14e24.tar.gz |
gtestdbus: Use g_unix_open_pipe_internal () for creating pipes
This attempts to create the pipes with race-free setting of the
close-on-exec flag.
Diffstat (limited to 'gio/gtestdbus.c')
-rw-r--r-- | gio/gtestdbus.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gio/gtestdbus.c b/gio/gtestdbus.c index 6aedb3eae..34cead176 100644 --- a/gio/gtestdbus.c +++ b/gio/gtestdbus.c @@ -50,6 +50,7 @@ #ifdef G_OS_UNIX #include "glib-unix.h" +#include "glib-unixprivate.h" #endif /* -------------------------------------------------------------------------- */ @@ -248,7 +249,7 @@ watcher_init (void) gint pipe_fds[2]; /* fork a child to clean up when we are killed */ - if (pipe (pipe_fds) != 0) + if (!g_unix_open_pipe_internal (pipe_fds, TRUE)) { errsv = errno; g_warning ("pipe() failed: %s", g_strerror (errsv)); |