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

Martin Pitt mpitt at alioth.debian.org
Thu Apr 10 04:04:49 UTC 2008


Author: mpitt
Date: Thu Apr 10 04:04:49 2008
New Revision: 754

Log:
* Drop pdftops-wait-eintr.dpatch, an improved version has been committed
  upstream. Integrate the upstream solution into pdftops-cups-1.4.dpatch.

Removed:
   cupsys/trunk/debian/patches/pdftops-wait-eintr.dpatch
Modified:
   cupsys/trunk/   (props changed)
   cupsys/trunk/debian/changelog
   cupsys/trunk/debian/patches/00list
   cupsys/trunk/debian/patches/pdftops-cups-1.4.dpatch

Modified: cupsys/trunk/debian/changelog
==============================================================================
--- cupsys/trunk/debian/changelog	(original)
+++ cupsys/trunk/debian/changelog	Thu Apr 10 04:04:49 2008
@@ -2,8 +2,10 @@
 
   * debian/control: Add missing build dependency lsb-release. (LP: #211375)
     Also wrap long fields, so that they are easier to edit.
+  * Drop pdftops-wait-eintr.dpatch, an improved version has been committed
+    upstream. Integrate the upstream solution into pdftops-cups-1.4.dpatch.
 
- -- Martin Pitt <mpitt at debian.org>  Sun, 06 Apr 2008 10:20:27 -0600
+ -- Martin Pitt <mpitt at debian.org>  Wed, 09 Apr 2008 23:03:12 -0500
 
 cupsys (1.3.7-1) unstable; urgency=medium
 

Modified: cupsys/trunk/debian/patches/00list
==============================================================================
--- cupsys/trunk/debian/patches/00list	(original)
+++ cupsys/trunk/debian/patches/00list	Thu Apr 10 04:04:49 2008
@@ -13,7 +13,6 @@
 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

Modified: cupsys/trunk/debian/patches/pdftops-cups-1.4.dpatch
==============================================================================
--- cupsys/trunk/debian/patches/pdftops-cups-1.4.dpatch	(original)
+++ cupsys/trunk/debian/patches/pdftops-cups-1.4.dpatch	Thu Apr 10 04:04:49 2008
@@ -8,8 +8,8 @@
 
 @DPATCH@
 diff -urNad trunk~/filter/Makefile trunk/filter/Makefile
---- trunk~/filter/Makefile	2007-07-20 01:27:49.000000000 +0200
-+++ trunk/filter/Makefile	2008-04-02 00:52:41.000000000 +0200
+--- trunk~/filter/Makefile	2008-04-06 11:14:48.000000000 -0500
++++ trunk/filter/Makefile	2008-04-09 23:00:00.000000000 -0500
 @@ -19,7 +19,7 @@
  
  
@@ -39,9 +39,9 @@
  #
  # rastertolabel
 diff -urNad trunk~/filter/pdftops.c trunk/filter/pdftops.c
---- trunk~/filter/pdftops.c	1970-01-01 01:00:00.000000000 +0100
-+++ trunk/filter/pdftops.c	2008-04-02 00:52:41.000000000 +0200
-@@ -0,0 +1,314 @@
+--- trunk~/filter/pdftops.c	1969-12-31 18:00:00.000000000 -0600
++++ trunk/filter/pdftops.c	2008-04-09 23:00:12.000000000 -0500
+@@ -0,0 +1,335 @@
 +/*
 + * "$Id$"
 + *
@@ -72,6 +72,7 @@
 +#include <cups/i18n.h>
 +#include <signal.h>
 +#include <sys/wait.h>
++#include <errno.h>
 +
 +
 +/*
@@ -82,6 +83,13 @@
 +
 +
 +/*
++ * Local globals...
++ */
++
++static int		job_canceled = 0;
++
++
++/*
 + * 'main()' - Main entry for filter...
 + */
 +
@@ -101,6 +109,7 @@
 +  ppd_file_t	*ppd;			/* PPD file */
 +  ppd_size_t	*size;			/* Current page size */
 +  int		pdfpid,			/* Process ID for pdftops */
++		pdfwaitpid,		/* Process ID from wait() */
 +		pdfstatus,		/* Status from pdftops */
 +		pdfargc;		/* Number of args for pdftops */
 +  char		*pdfargv[100],		/* Arguments for pdftops */
@@ -305,7 +314,17 @@
 +    * Parent comes here...
 +    */
 +
-+    if (wait(&pdfstatus) != pdfpid)
++    while ((pdfwaitpid = wait(&pdfstatus)) < 0 && errno == EINTR)
++    {
++     /*
++      * Wait until we get a valid process ID or the job is canceled...
++      */
++
++      if (job_canceled)
++	break;
++    }
++
++    if (pdfwaitpid != pdfpid)
 +    {
 +      kill(pdfpid, SIGTERM);
 +      pdfstatus = 1;
@@ -350,6 +369,8 @@
 +cancel_job(int sig)			/* I - Signal number (unused) */
 +{
 +  (void)sig;
++
++  job_canceled = 1;
 +}
 +
 +
@@ -357,8 +378,8 @@
 + * End of "$Id$".
 + */
 diff -urNad trunk~/test/run-stp-tests.sh trunk/test/run-stp-tests.sh
---- trunk~/test/run-stp-tests.sh	2008-04-02 00:52:38.000000000 +0200
-+++ trunk/test/run-stp-tests.sh	2008-04-02 00:53:23.000000000 +0200
+--- trunk~/test/run-stp-tests.sh	2008-04-09 22:59:59.000000000 -0500
++++ trunk/test/run-stp-tests.sh	2008-04-09 23:00:00.000000000 -0500
 @@ -273,7 +273,7 @@
  else
  	ln -s $root/filter/imagetops /tmp/cups-$user/bin/filter



More information about the Pkg-cups-devel mailing list