-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'cancel -x -a' starts all pending jobs before stopping them #4648
Comments
CUPS.org User: twaugh.redhat Patch attached. |
CUPS.org User: mike Need to look at this some more, but we should be delaying any job scheduling decisions until Cancel-[My-]Jobs processing is complete (which is supposed to be an atomic operation...) |
CUPS.org User: twaugh.redhat Actually you need to use 'cancel -x -a' to reproduce this. It happens with e.g. 2.0.3. |
CUPS.org User: twaugh.redhat This seems to fix it. |
CUPS.org User: mike Fixed in Subversion repository. I've attached an alternate patch which fixes when cupsdCheckJobs is called. |
"0001-In-cupsdCancelJobs-handle-pending-jobs-first-STR-464.patch": From 82b82b2d5023cb8ada5834612793b2909dd6ea82 Mon Sep 17 00:00:00 2001 scheduler/job.c | 46 +++++++++++++++++++++++++++++----------------- diff --git a/scheduler/job.c b/scheduler/job.c
- continue;
2.4.3 |
"0001-Don-t-call-cupsdCheckJobs-from-finalize_job-STR-4648.patch": From 701f12da6b102dc1d7f34fa4ab36e5bd481d11a7 Mon Sep 17 00:00:00 2001 scheduler/job.c | 18 +++++++++++------- diff --git a/scheduler/job.c b/scheduler/job.c
if (job->printer)
if (action == CUPSD_JOB_PURGE) @@ -3526,13 +3537,6 @@ finalize_job(cupsd_job_t job, / I - Job */ job->printer->job = NULL; job->printer = NULL;
- */
2.4.3 |
"str4648.patch": Index: scheduler/ipp.c--- scheduler/ipp.c (revision 12776) con->response->request.status.status_code = IPP_OK;
Index: scheduler/job.c--- scheduler/job.c (revision 12776) }
@@ -3526,13 +3524,6 @@ job->printer->job = NULL; job->printer = NULL;
- */
@@ -4849,6 +4840,8 @@
|
Version: 2.0.3
CUPS.org User: twaugh.redhat
When using 'cancel -a' to cancel all the jobs, each time a processing job is stopped another pending job is started before it, too, is stopped.
This can be avoided by dealing with the pending jobs first, then dealing with other jobs.
The cause is that finalize_job() (from cupsdSetJobState()) calls cupsdCheckJobs() right at the end.
The text was updated successfully, but these errors were encountered: