Status of the dvipdfm needs to be checked after exit. Fixes
GNOME bug #579656.
#include <string.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
+#include <sys/wait.h>
+#include <stdlib.h>
#include "comics-document.h"
#include "ev-document-misc.h"
if (!success) {
return FALSE;
- } else if (retval != 0) {
+ } else if (!WIFEXITED(retval) || WEXITSTATUS(retval) != EXIT_SUCCESS) {
g_set_error_literal (error,
EV_DOCUMENT_ERROR,
EV_DOCUMENT_ERROR_INVALID,
#include <glib/gi18n-lib.h>
#include <ctype.h>
+#include <sys/wait.h>
+#include <stdlib.h>
GMutex *dvi_context_mutex = NULL;
if (success == FALSE) {
g_warning ("Error: %s", err->message);
- } else if (exit_stat != 0) {
- g_warning ("Error: dvipdfm exited with non-zero status.");
+ } else if (!WIFEXITED(exit_stat) || WEXITSTATUS(exit_stat) != EXIT_SUCCESS){
+ g_warning ("Error: dvipdfm does not end normally or exit with a failure status.");
}
if (err)