[glib: 3/7] glib/spawn: win32 helper doesn't support same fd for out&err
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 3/7] glib/spawn: win32 helper doesn't support same fd for out&err
- Date: Wed, 9 Feb 2022 11:19:17 +0000 (UTC)
commit 34ce1b1f93e15b014a3479269c38d377dfc0385b
Author: Marc-André Lureau <marcandre lureau redhat com>
Date: Thu Feb 3 23:53:44 2022 +0400
glib/spawn: win32 helper doesn't support same fd for out&err
This is fixed in the following commits of this MR.
Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>
glib/gspawn.c | 4 ++++
glib/tests/spawn-singlethread.c | 2 ++
2 files changed, 6 insertions(+)
---
diff --git a/glib/gspawn.c b/glib/gspawn.c
index d4644f164..7a2618489 100644
--- a/glib/gspawn.c
+++ b/glib/gspawn.c
@@ -854,6 +854,8 @@ g_spawn_async_with_pipes (const gchar *working_directory,
* windows on the right screen, you may want to use #GdkAppLaunchContext,
* #GAppLaunchContext, or set the `DISPLAY` environment variable.
*
+ * On Windows, sharing the same FD for @stdout_fd and @stderr_fd is not supported.
+ *
* Returns: %TRUE on success, %FALSE if an error was set
*
* Since: 2.68
@@ -936,6 +938,8 @@ g_spawn_async_with_pipes_and_fds (const gchar *working_directory,
* Identical to g_spawn_async_with_pipes_and_fds() but with `n_fds` set to zero,
* so no FD assignments are used.
*
+ * On Windows, sharing the same FD for @stdout_fd and @stderr_fd is not supported.
+ *
* Returns: %TRUE on success, %FALSE if an error was set
*
* Since: 2.58
diff --git a/glib/tests/spawn-singlethread.c b/glib/tests/spawn-singlethread.c
index 7711ba8fe..159e8c34a 100644
--- a/glib/tests/spawn-singlethread.c
+++ b/glib/tests/spawn-singlethread.c
@@ -196,7 +196,9 @@ test_spawn_async_with_fds (void)
{ NO_FD, NO_FD, NO_FD }, /* Test with no fds passed */
{ NO_FD, FD_NEGATIVE, NO_FD }, /* Test another negative fd value */
{ PIPE, PIPE, PIPE }, /* Test with unique fds passed */
+#ifndef G_OS_WIN32
{ NO_FD, PIPE, STDOUT_PIPE }, /* Test the same fd for stdout + stderr */
+#endif
};
arg = g_strdup_printf ("thread %d", tnum);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]