[gnome-builder] subprocess: use FD_CLOEXEC not O_CLOEXEC for g_unix_open_pipe
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] subprocess: use FD_CLOEXEC not O_CLOEXEC for g_unix_open_pipe
- Date: Thu, 6 Oct 2016 13:43:40 +0000 (UTC)
commit 8ccfd41ef188179d981eb3eaff078043f0c3014a
Author: Ray Strode <rstrode redhat com>
Date: Thu Oct 6 09:40:58 2016 -0400
subprocess: use FD_CLOEXEC not O_CLOEXEC for g_unix_open_pipe
One giant pitfall with g_unix_open_pipe is its flags are fcntl
flags, not open flags.
This commit fixes the three g_unix_open_pipe invocations in
ide-breakout-subprocess to use FD_CLOEXEC.
https://bugzilla.gnome.org/show_bug.cgi?id=772279
libide/subprocess/ide-breakout-subprocess.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libide/subprocess/ide-breakout-subprocess.c b/libide/subprocess/ide-breakout-subprocess.c
index 2056959..416ff09 100644
--- a/libide/subprocess/ide-breakout-subprocess.c
+++ b/libide/subprocess/ide-breakout-subprocess.c
@@ -1203,7 +1203,7 @@ ide_breakout_subprocess_initable_init (GInitable *initable,
}
else if (self->flags & G_SUBPROCESS_FLAGS_STDIN_PIPE)
{
- if (!g_unix_open_pipe (stdin_pair, O_CLOEXEC, error))
+ if (!g_unix_open_pipe (stdin_pair, FD_CLOEXEC, error))
IDE_GOTO (cleanup_fds);
}
else
@@ -1245,7 +1245,7 @@ ide_breakout_subprocess_initable_init (GInitable *initable,
}
else if (self->flags & G_SUBPROCESS_FLAGS_STDOUT_PIPE)
{
- if (!g_unix_open_pipe (stdout_pair, O_CLOEXEC, error))
+ if (!g_unix_open_pipe (stdout_pair, FD_CLOEXEC, error))
IDE_GOTO (cleanup_fds);
}
else
@@ -1285,7 +1285,7 @@ ide_breakout_subprocess_initable_init (GInitable *initable,
}
else if (self->flags & G_SUBPROCESS_FLAGS_STDERR_PIPE)
{
- if (!g_unix_open_pipe (stderr_pair, O_CLOEXEC, error))
+ if (!g_unix_open_pipe (stderr_pair, FD_CLOEXEC, error))
IDE_GOTO (cleanup_fds);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]