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>
This commit is contained in:
Marc-André Lureau 2022-02-03 23:53:44 +04:00
parent 10b450eaf6
commit 34ce1b1f93
2 changed files with 6 additions and 0 deletions

View File

@ -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

View File

@ -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);