[glib: 3/6] gspawn, win32: fix redirecting only stderr
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 3/6] gspawn, win32: fix redirecting only stderr
- Date: Thu, 27 Dec 2018 12:52:31 +0000 (UTC)
commit cafb61a1799be28a43e6bb1da7760cda91ee2818
Author: Vasily Galkin <galkin-vv yandex ru>
Date: Wed Dec 26 23:51:54 2018 +0300
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.
glib/gspawn-win32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/gspawn-win32.c b/glib/gspawn-win32.c
index b0cf5ab7a..3a746914b 100644
--- a/glib/gspawn-win32.c
+++ b/glib/gspawn-win32.c
@@ -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];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]