#include "config.h"
#include "glib.h"
+#include "glib-private.h"
#include "gprintfint.h"
#include "glibintl.h"
-#include "galias.h"
+#include "gthread.h"
#include <string.h>
#include <stdlib.h>
#include <direct.h>
#include <wchar.h>
+#ifndef GSPAWN_HELPER
#ifdef G_SPAWN_WIN32_DEBUG
static int debug = 1;
#define SETUP_DEBUG() /* empty */
} \
G_STMT_END
#endif
+#endif
enum
{
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,
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)
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,
#endif /* !_WIN64 */
#endif /* !GSPAWN_HELPER */
-
-#define __G_SPAWN_C__
-#include "galiasdef.c"