if (state->preproc_options)
{
gchar **options;
+ gchar *stderr_child = NULL;
guint i;
gboolean xml_stripblanks = FALSE;
gboolean to_pixdata = FALSE;
g_assert (argc <= G_N_ELEMENTS (argv));
if (!g_spawn_sync (NULL /* cwd */, argv, NULL /* envv */,
- G_SPAWN_STDOUT_TO_DEV_NULL |
- G_SPAWN_STDERR_TO_DEV_NULL,
- NULL, NULL, NULL, NULL, &status, &my_error))
+ G_SPAWN_STDOUT_TO_DEV_NULL,
+ NULL, NULL, NULL, &stderr_child, &status, &my_error))
{
g_propagate_error (error, my_error);
goto cleanup;
#ifdef HAVE_SYS_WAIT_H
if (!WIFEXITED (status) || WEXITSTATUS (status) != 0)
{
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Error processing input file with xmllint"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Error processing input file with xmllint:\n%s"), stderr_child);
goto cleanup;
}
#endif
+ g_free (stderr_child);
g_free (real_file);
real_file = g_strdup (tmp_file);
}
if (to_pixdata)
{
gchar *argv[4];
+ gchar *stderr_child = NULL;
int status, fd, argc;
if (gdk_pixbuf_pixdata == NULL)
g_assert (argc <= G_N_ELEMENTS (argv));
if (!g_spawn_sync (NULL /* cwd */, argv, NULL /* envv */,
- G_SPAWN_STDOUT_TO_DEV_NULL |
- G_SPAWN_STDERR_TO_DEV_NULL,
- NULL, NULL, NULL, NULL, &status, &my_error))
+ G_SPAWN_STDOUT_TO_DEV_NULL,
+ NULL, NULL, NULL, &stderr_child, &status, &my_error))
{
g_propagate_error (error, my_error);
goto cleanup;
#ifdef HAVE_SYS_WAIT_H
if (!WIFEXITED (status) || WEXITSTATUS (status) != 0)
{
- g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED,
- _("Error processing input file with to-pixdata"));
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("Error processing input file with to-pixdata:\n%s"), stderr_child);
goto cleanup;
}
#endif
+ g_free (stderr_child);
g_free (real_file);
real_file = g_strdup (tmp_file2);
}