35 lines
825 B
Diff
35 lines
825 B
Diff
Index: pdftops.c
|
|
===================================================================
|
|
--- cups-1.4svn/filter/pdftops.c (revision 7480)
|
|
+++ cups-1.4svn/filter/pdftops.c (revision 7481)
|
|
@@ -327,23 +327,21 @@
|
|
* Parent comes here...
|
|
*/
|
|
|
|
- while ((pdfwaitpid = wait(&pdfstatus)) < 0 && errno == EINTR)
|
|
+ while ((pdfwaitpid = wait(&pdfstatus)) != pdfpid && errno == EINTR)
|
|
{
|
|
/*
|
|
* Wait until we get a valid process ID or the job is canceled...
|
|
*/
|
|
|
|
if (job_canceled)
|
|
- break;
|
|
+ {
|
|
+ kill(pdfpid, SIGTERM);
|
|
+ job_canceled = 0;
|
|
+ }
|
|
}
|
|
|
|
- if (pdfwaitpid != pdfpid)
|
|
+ if (pdfstatus)
|
|
{
|
|
- kill(pdfpid, SIGTERM);
|
|
- pdfstatus = 1;
|
|
- }
|
|
- else if (pdfstatus)
|
|
- {
|
|
if (WIFEXITED(pdfstatus))
|
|
{
|
|
pdfstatus = WEXITSTATUS(pdfstatus);
|