Index: job.c =================================================================== --- job.c (revision 5296) +++ job.c (working copy) @@ -1574,6 +1574,14 @@ } /* + * Set a minimum cost of 100 for all jobs so that FilterLimit + * works with raw queues and other low-cost paths. + */ + + if (job->cost < 100) + job->cost = 100; + + /* * See if the filter cost is too high... */ @@ -2322,6 +2330,13 @@ "Unable to start filter \"%s\" - %s.", filter->filter, strerror(errno)); + cupsdLogMessage(CUPSD_LOG_DEBUG2, + "cupsdStartJob: Closing filter pipes for slot %d " + "[ %d %d ]...", + slot, filterfds[slot][0], filterfds[slot][1]); + + cupsdClosePipe(filterfds[slot]); + cupsdAddPrinterHistory(printer); cupsArrayDelete(filters); @@ -2370,7 +2385,7 @@ if (RunUser) backroot = 0; - else if (lstat(command, &backinfo)) + else if (stat(command, &backinfo)) backroot = 0; else backroot = !(backinfo.st_mode & (S_IRWXG | S_IRWXO)); @@ -2391,6 +2406,13 @@ cupsdClosePipe(statusfds); + cupsdLogMessage(CUPSD_LOG_DEBUG2, + "cupsdStartJob: Closing filter pipes for slot %d " + "[ %d %d ]...", + !slot, filterfds[!slot][0], filterfds[!slot][1]); + + cupsdClosePipe(filterfds[!slot]); + cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job, "Job canceled because the server could not open a file."); @@ -2429,17 +2451,12 @@ strerror(errno)); cupsdLogMessage(CUPSD_LOG_DEBUG2, - "cupsdStartJob: Closing print pipes [ %d %d ]...", - job->print_pipes[0], job->print_pipes[1]); + "cupsdStartJob: Closing filter pipes for slot %d " + "[ %d %d ]...", + !slot, filterfds[!slot][0], filterfds[!slot][1]); - cupsdClosePipe(job->print_pipes); + cupsdClosePipe(filterfds[!slot]); - cupsdLogMessage(CUPSD_LOG_DEBUG2, - "cupsdStartJob: Closing back pipes [ %d %d ]...", - job->back_pipes[0], job->back_pipes[1]); - - cupsdClosePipe(job->back_pipes); - cupsdAddEvent(CUPSD_EVENT_JOB_COMPLETED, job->printer, job, "Job canceled because the server could not execute " "the backend."); @@ -2483,6 +2500,13 @@ filterfds[slot][0] = -1; filterfds[slot][1] = -1; + cupsdLogMessage(CUPSD_LOG_DEBUG2, + "cupsdStartJob: Closing filter pipes for slot %d " + "[ %d %d ]...", + !slot, filterfds[!slot][0], filterfds[!slot][1]); + + cupsdClosePipe(filterfds[!slot]); + if (job->current_file == job->num_files) { cupsdLogMessage(CUPSD_LOG_DEBUG2,