[Pkg-cups-devel] r742 - in cupsys/trunk: . debian debian/patches

Martin Pitt mpitt at alioth.debian.org
Wed Apr 2 01:03:01 UTC 2008


Author: mpitt
Date: Wed Apr  2 01:03:00 2008
New Revision: 742

Log:
* Add pdftops-wait-eintr.dpatch: Handle EINTR in pdftops' wait() call.
  (Caught by test suite.)

Added:
   cupsys/trunk/debian/patches/pdftops-wait-eintr.dpatch   (contents, props changed)
Modified:
   cupsys/trunk/   (props changed)
   cupsys/trunk/debian/changelog
   cupsys/trunk/debian/patches/00list

Modified: cupsys/trunk/debian/changelog
==============================================================================
--- cupsys/trunk/debian/changelog	(original)
+++ cupsys/trunk/debian/changelog	Wed Apr  2 01:03:00 2008
@@ -14,8 +14,10 @@
     message newlines (STR #2743).
   * debian/rules: Remove cleaning of test suite HTML reports in test/, they
     are written to /tmp now.
+  * Add pdftops-wait-eintr.dpatch: Handle EINTR in pdftops' wait() call.
+    (Caught by test suite.)
 
- -- Martin Pitt <mpitt at debian.org>  Wed, 02 Apr 2008 01:59:28 +0200
+ -- Martin Pitt <mpitt at debian.org>  Wed, 02 Apr 2008 03:02:10 +0200
 
 cupsys (1.3.6-3) unstable; urgency=high
 

Modified: cupsys/trunk/debian/patches/00list
==============================================================================
--- cupsys/trunk/debian/patches/00list	(original)
+++ cupsys/trunk/debian/patches/00list	Wed Apr  2 01:03:00 2008
@@ -13,6 +13,7 @@
 include_krb5_h_in_job_h.dpatch
 search_mime_files_in_usr_share.dpatch
 pdftops-cups-1.4.dpatch
+pdftops-wait-eintr.dpatch
 ppd-poll-with-client-conf.dpatch
 ubuntu-disable-browsing.dpatch
 ubuntu-default-error-policy-retry-job.dpatch

Added: cupsys/trunk/debian/patches/pdftops-wait-eintr.dpatch
==============================================================================
--- (empty file)
+++ cupsys/trunk/debian/patches/pdftops-wait-eintr.dpatch	Wed Apr  2 01:03:00 2008
@@ -0,0 +1,40 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## pdftops-wait-eintr.dpatch by  <mpitt at debian.org>
+##
+## DP: Handle EINTR in pdftops' wait() call.
+
+ at DPATCH@
+diff -urNad trunk~/filter/pdftops.c trunk/filter/pdftops.c
+--- trunk~/filter/pdftops.c	2008-04-02 02:54:45.000000000 +0200
++++ trunk/filter/pdftops.c	2008-04-02 02:54:59.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include <cups/i18n.h>
+ #include <signal.h>
+ #include <sys/wait.h>
++#include <errno.h>
+ 
+ 
+ /*
+@@ -62,6 +63,7 @@
+   char		*pdfargv[100],		/* Arguments for pdftops */
+ 		pdfwidth[255],		/* Paper width */
+ 		pdfheight[255];		/* Paper height */
++  pid_t		child;			/* wait() result */
+ #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+   struct sigaction action;		/* Actions for POSIX signals */
+ #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
+@@ -260,8 +262,13 @@
+    /*
+     * Parent comes here...
+     */
++ 
++    do
++    {
++      child = wait(&pdfstatus);
++    } while (child < 0 && errno == EINTR);
+ 
+-    if (wait(&pdfstatus) != pdfpid)
++    if (child != pdfpid)
+     {
+       kill(pdfpid, SIGTERM);
+       pdfstatus = 1;



More information about the Pkg-cups-devel mailing list