glib: Pass O_CLOEXEC rather than FD_CLOEXEC to g_unix_open_pipe()

See the previous commit.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
This commit is contained in:
Philip Withnall
2023-08-16 14:31:02 +01:00
parent d0dc7171d6
commit 07c4b6c68e
9 changed files with 15 additions and 15 deletions

View File

@@ -306,9 +306,9 @@ test_once (Fixture *f,
GDBusMessage *message;
gboolean pipe_res;
pipe_res = g_unix_open_pipe (f->server_to_client, FD_CLOEXEC, &f->error);
pipe_res = g_unix_open_pipe (f->server_to_client, O_CLOEXEC, &f->error);
g_assert (pipe_res);
pipe_res = g_unix_open_pipe (f->client_to_server, FD_CLOEXEC, &f->error);
pipe_res = g_unix_open_pipe (f->client_to_server, O_CLOEXEC, &f->error);
g_assert (pipe_res);
f->server_iostream = my_io_stream_new_for_fds (f->client_to_server[0],

View File

@@ -1750,9 +1750,9 @@ do_test_pass_fd (GSubprocessFlags flags,
char *basic_fd_str;
char *needdup_fd_str;
g_unix_open_pipe (basic_pipefds, FD_CLOEXEC, error);
g_unix_open_pipe (basic_pipefds, O_CLOEXEC, error);
g_assert_no_error (local_error);
g_unix_open_pipe (needdup_pipefds, FD_CLOEXEC, error);
g_unix_open_pipe (needdup_pipefds, O_CLOEXEC, error);
g_assert_no_error (local_error);
basic_fd_str = g_strdup_printf ("%d", basic_pipefds[1]);
@@ -1854,10 +1854,10 @@ do_test_fd_conflation (GSubprocessFlags flags,
return;
}
g_unix_open_pipe (unused_pipefds, FD_CLOEXEC, &error);
g_unix_open_pipe (unused_pipefds, O_CLOEXEC, &error);
g_assert_no_error (error);
g_unix_open_pipe (pipefds, FD_CLOEXEC, &error);
g_unix_open_pipe (pipefds, O_CLOEXEC, &error);
g_assert_no_error (error);
/* The fds should be sequential since we are in a new process. */

View File

@@ -63,7 +63,7 @@ test_fd_list (void)
s = _pipe (sv, 4096, _O_NOINHERIT | _O_BINARY);
g_assert_cmpint (s, ==, 0);
#else
g_unix_open_pipe (sv, FD_CLOEXEC, &err);
g_unix_open_pipe (sv, O_CLOEXEC, &err);
g_assert_no_error (err);
#endif
list = g_unix_fd_list_new_from_array (sv, -1);