From 53a4e573de2d4d9cfe62069f6dbc3c5a7725c884 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 19 Jun 2008 07:13:36 +0000 Subject: [PATCH] Bug 539074 - Cannot get exit status with g_spawn_command_line_sync() 2008-06-19 Tor Lillqvist Bug 539074 - Cannot get exit status with g_spawn_command_line_sync() * glib/gspawn-win32-helper.c (main): Write also the exit status of the spawned process to the error report pipe. Patch by Hiroyuki Ikezoe. svn path=/trunk/; revision=7060 --- ChangeLog | 8 ++++++++ glib/gspawn-win32-helper.c | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 67aa18f..84c0841 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-19 Tor Lillqvist + + Bug 539074 - Cannot get exit status with g_spawn_command_line_sync() + + * glib/gspawn-win32-helper.c (main): Write also the exit status of + the spawned process to the error report pipe. Patch by Hiroyuki + Ikezoe. + 2008-06-19 Matthias Clasen Bug 535949 – annotate g_strip_context and g_dpgettext with diff --git a/glib/gspawn-win32-helper.c b/glib/gspawn-win32-helper.c index c24f156..ce1db90 100644 --- a/glib/gspawn-win32-helper.c +++ b/glib/gspawn-win32-helper.c @@ -166,7 +166,6 @@ main (int ignored_argc, char **ignored_argv) int handle; int saved_errno; int no_error = CHILD_NO_ERROR; - int zero = 0; gint argv_zero_offset = ARG_PROGRAM; wchar_t **new_wargv; int argc; @@ -326,10 +325,7 @@ main (int ignored_argc, char **ignored_argv) write_err_and_exit (child_err_report_fd, CHILD_SPAWN_FAILED); write (child_err_report_fd, &no_error, sizeof (no_error)); - if (mode == P_NOWAIT) - write (child_err_report_fd, &handle, sizeof (handle)); - else - write (child_err_report_fd, &zero, sizeof (zero)); + write (child_err_report_fd, &handle, sizeof (handle)); read (helper_sync_fd, &c, 1); -- 2.7.4