diff options
Diffstat (limited to 'glib/gspawn-win32.c')
-rw-r--r-- | glib/gspawn-win32.c | 41 |
1 files changed, 24 insertions, 17 deletions
diff --git a/glib/gspawn-win32.c b/glib/gspawn-win32.c index 0f6579eab..c92679157 100644 --- a/glib/gspawn-win32.c +++ b/glib/gspawn-win32.c @@ -927,7 +927,7 @@ g_spawn_sync (const gchar *working_directory, gpointer user_data, gchar **standard_output, gchar **standard_error, - gint *exit_status, + gint *wait_status, GError **error) { gint outpipe = -1; @@ -1102,8 +1102,8 @@ g_spawn_sync (const gchar *working_directory, /* No helper process, exit status of actual spawned process * already available. */ - if (exit_status) - *exit_status = status; + if (wait_status) + *wait_status = status; } else { @@ -1119,8 +1119,8 @@ g_spawn_sync (const gchar *working_directory, switch (helper_report[0]) { case CHILD_NO_ERROR: - if (exit_status) - *exit_status = helper_report[1]; + if (wait_status) + *wait_status = helper_report[1]; break; default: set_child_error (helper_report, working_directory, error); @@ -1310,7 +1310,7 @@ gboolean g_spawn_command_line_sync (const gchar *command_line, gchar **standard_output, gchar **standard_error, - gint *exit_status, + gint *wait_status, GError **error) { gboolean retval; @@ -1331,7 +1331,7 @@ g_spawn_command_line_sync (const gchar *command_line, NULL, standard_output, standard_error, - exit_status, + wait_status, error); g_strfreev (argv); @@ -1372,16 +1372,16 @@ g_spawn_close_pid (GPid pid) } gboolean -g_spawn_check_exit_status (gint exit_status, +g_spawn_check_wait_status (gint wait_status, GError **error) { gboolean ret = FALSE; - if (exit_status != 0) + if (wait_status != 0) { - g_set_error (error, G_SPAWN_EXIT_ERROR, exit_status, + g_set_error (error, G_SPAWN_EXIT_ERROR, wait_status, _("Child process exited with code %ld"), - (long) exit_status); + (long) wait_status); goto out; } @@ -1390,6 +1390,13 @@ g_spawn_check_exit_status (gint exit_status, return ret; } +gboolean +g_spawn_check_exit_status (gint wait_status, + GError **error) +{ + return g_spawn_check_wait_status (wait_status, error); +} + #ifdef G_OS_WIN32 /* Binary compatibility versions. Not for newly compiled code. */ @@ -1421,12 +1428,12 @@ _GLIB_EXTERN gboolean g_spawn_sync_utf8 (const gchar *wo gpointer user_data, gchar **standard_output, gchar **standard_error, - gint *exit_status, + gint *wait_status, GError **error); _GLIB_EXTERN gboolean g_spawn_command_line_sync_utf8 (const gchar *command_line, gchar **standard_output, gchar **standard_error, - gint *exit_status, + gint *wait_status, GError **error); _GLIB_EXTERN gboolean g_spawn_command_line_async_utf8 (const gchar *command_line, GError **error); @@ -1486,7 +1493,7 @@ g_spawn_sync_utf8 (const gchar *working_directory, gpointer user_data, gchar **standard_output, gchar **standard_error, - gint *exit_status, + gint *wait_status, GError **error) { return g_spawn_sync (working_directory, @@ -1497,7 +1504,7 @@ g_spawn_sync_utf8 (const gchar *working_directory, user_data, standard_output, standard_error, - exit_status, + wait_status, error); } @@ -1505,13 +1512,13 @@ gboolean g_spawn_command_line_sync_utf8 (const gchar *command_line, gchar **standard_output, gchar **standard_error, - gint *exit_status, + gint *wait_status, GError **error) { return g_spawn_command_line_sync (command_line, standard_output, standard_error, - exit_status, + wait_status, error); } |