X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=glib%2Fgspawn-win32.c;h=2acbde33c7d73c38503c2ea2ee2f3d8594011928;hb=d217429729aad360f372633f2ec99778c0fc08d5;hp=dc48a25c39d5ed652d6bc4bd66bd0cb1fa0b3886;hpb=8ef30758d56b21aa20c23e5c90a78142183003ed;p=platform%2Fupstream%2Fglib.git diff --git a/glib/gspawn-win32.c b/glib/gspawn-win32.c index dc48a25..2acbde3 100644 --- a/glib/gspawn-win32.c +++ b/glib/gspawn-win32.c @@ -45,9 +45,10 @@ #include "config.h" #include "glib.h" +#include "glib-private.h" #include "gprintfint.h" #include "glibintl.h" -#include "galias.h" +#include "gthread.h" #include #include @@ -61,6 +62,7 @@ #include #include +#ifndef GSPAWN_HELPER #ifdef G_SPAWN_WIN32_DEBUG static int debug = 1; #define SETUP_DEBUG() /* empty */ @@ -79,6 +81,7 @@ } \ G_STMT_END #endif +#endif enum { @@ -206,11 +209,8 @@ protect_argv (gchar **argv, return argc; } -GQuark -g_spawn_error_quark (void) -{ - return g_quark_from_static_string ("g-exec-error-quark"); -} +G_DEFINE_QUARK (g-exec-error-quark, g_spawn_error) +G_DEFINE_QUARK (g-spawn-exit-error-quark, g_spawn_exit_error) gboolean g_spawn_async_utf8 (const gchar *working_directory, @@ -548,7 +548,6 @@ do_spawn_with_pipes (gint *exit_status, gchar *helper_process; CONSOLE_CURSOR_INFO cursor_info; wchar_t *whelper, **wargv, **wenvp; - extern gchar *_glib_get_dll_directory (void); gchar *glib_dll_directory; if (child_setup && !warned_about_child_setup) @@ -1222,6 +1221,25 @@ g_spawn_close_pid (GPid pid) CloseHandle (pid); } +gboolean +g_spawn_check_exit_status (gint exit_status, + GError **error) +{ + gboolean ret = FALSE; + + if (exit_status != 0) + { + g_set_error (error, G_SPAWN_EXIT_ERROR, exit_status, + _("Child process exited with code %ld"), + (long) exit_status); + goto out; + } + + ret = TRUE; + out: + return ret; +} + #if !defined (_WIN64) /* Binary compatibility versions that take system codepage pathnames, @@ -1492,6 +1510,3 @@ g_spawn_command_line_async (const gchar *command_line, #endif /* !_WIN64 */ #endif /* !GSPAWN_HELPER */ - -#define __G_SPAWN_C__ -#include "galiasdef.c"