]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
Add warning log for non-zero exit status of ghostscript
authorRohit Kumar <149245736+rkt0209@users.noreply.github.com>
Wed, 4 Mar 2026 03:31:13 +0000 (09:01 +0530)
committerTill Kamppeter <till.kamppeter@gmail.com>
Thu, 5 Mar 2026 17:31:02 +0000 (18:31 +0100)
Log a warning if ghostscript process exits with a non-zero status.

filter/foomatic-rip/pdf.c

index f896431465cd5eb7956e56600754d00987385bce..d7e2204725724db114672140dc8728cf0ab27174 100644 (file)
@@ -146,7 +146,9 @@ pdf_extract_pages(char filename[PATH_MAX],
   FILE *pd = popen(gscommand, "r");
   if (!pd)
     rip_die(EXIT_STARVED, "Could not run ghostscript to extract the pages!\n");
-  pclose(pd);
+  
+  if (pclose(pd) != 0)
+    _log("Warning: ghostscript process exited with non-zero status\n");
 
   return (1);
 }