Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/backend/dvi
diff options
context:
space:
mode:
authorJuanjo MarĂ­n <juanj.marin@juntadeandalucia.es>2009-04-26 10:30:49 (GMT)
committer Nickolay V. Shmyrev <nshmyrev@yandex.ru>2009-04-26 10:30:49 (GMT)
commit0da7f82a8a347f47809b4f9553555b18323089d9 (patch)
treef7abe18d4245e772ca6aef822b9dc29032eee303 /backend/dvi
parentfd6cd4eb3b7d5ce61417aec33bd68eabf63e3349 (diff)
[comics] Correct check for exit status
Status of the dvipdfm needs to be checked after exit. Fixes GNOME bug #579656.
Diffstat (limited to 'backend/dvi')
-rw-r--r--backend/dvi/dvi-document.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/dvi/dvi-document.c b/backend/dvi/dvi-document.c
index a6c3340..a1097c9 100644
--- a/backend/dvi/dvi-document.c
+++ b/backend/dvi/dvi-document.c
@@ -32,6 +32,8 @@
#include <glib/gi18n-lib.h>
#include <ctype.h>
+#include <sys/wait.h>
+#include <stdlib.h>
GMutex *dvi_context_mutex = NULL;
@@ -398,8 +400,8 @@ dvi_document_file_exporter_end (EvFileExporter *exporter)
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)