mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 00:16:15 +01:00
gspawn, win32: fix redirecting only stderr
Problem was just a typo - wrong variable was checked before enabling stderr redirection. This fixes error-only redirection spawn-test added in previous commit. Behavior while redirecting only stdout should be unaffected, since old code tried to redirect stderr to -1 in such case, which silently failed I think.
This commit is contained in:
parent
50cb4f221c
commit
cafb61a179
@ -657,7 +657,7 @@ do_spawn_with_fds (gint *exit_status,
|
||||
new_argv[ARG_STDOUT] = "-";
|
||||
}
|
||||
|
||||
if (stdout_fd != -1)
|
||||
if (stderr_fd != -1)
|
||||
{
|
||||
_g_sprintf (args[ARG_STDERR], "%d", stderr_fd);
|
||||
new_argv[ARG_STDERR] = args[ARG_STDERR];
|
||||
|
Loading…
Reference in New Issue
Block a user