Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Update job-printer-state-message when canceling a job #2806

Closed

Description

@michaelrsweet

Version: 1.3-current
CUPS.org User: mike

Currently a canceled job will typically have a final job-printer-state-message of "/usr/lib/cups/backend/foo failed". We should put an auto-generated message instead stating that the job was canceled.

Activity

  1. michaelrsweet commented on Apr 21, 2008

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

  2. michaelrsweet commented on Apr 21, 2008

    @michaelrsweet
    ContributorAuthor

    "str2806.patch":

    Index: scheduler/main.c

    --- scheduler/main.c (revision 7475)
    +++ scheduler/main.c (working copy)
    @@ -1632,27 +1632,6 @@

     cupsdFinishProcess(pid, name, sizeof(name));
    
    • if (status == SIGTERM)

    - status = 0;

    • if (status)
    • {
    •  if (WIFEXITED(status))
      
    • cupsdLogMessage(CUPSD_LOG_ERROR, "PID %d (%s) stopped with status %d!",
    •               pid, name, WEXITSTATUS(status));
      
    •  else
      
    • cupsdLogMessage(CUPSD_LOG_ERROR, "PID %d (%s) crashed on signal %d!",

    - pid, name, WTERMSIG(status));

    •  if (LogLevel < CUPSD_LOG_DEBUG)
      
    •    cupsdLogMessage(CUPSD_LOG_INFO,
      
    •               "Hint: Try setting the LogLevel to \"debug\" to find "
      
    •       "out more.");
      
    • }
    • else
    •  cupsdLogMessage(CUPSD_LOG_DEBUG, "PID %d (%s) exited with no errors.",
      

    - pid, name);

    /*
     * Delete certificates for CGI processes...
     */
    

    @@ -1684,6 +1663,9 @@
    else
    job->backend = -pid;

    •      if (job->state_value == IPP_JOB_CANCELED)
      
    •   status = 0;         /\* Ignore errors when canceling jobs _/
      
      •  if (status && job->status >= 0)
        
        {
        /_
        @@ -1731,6 +1713,31 @@
        break;
        }
        }
    • /*
    • * Show the exit status as needed...
    • */
    • if (status == SIGTERM)
    •  status = 0;
      
    • if (status)
    • {
    •  if (WIFEXITED(status))
      
    • cupsdLogMessage(CUPSD_LOG_ERROR, "PID %d (%s) stopped with status %d!",
    •               pid, name, WEXITSTATUS(status));
      
    •  else
      
    • cupsdLogMessage(CUPSD_LOG_ERROR, "PID %d (%s) crashed on signal %d!",
    •               pid, name, WTERMSIG(status));
      
    •  if (LogLevel < CUPSD_LOG_DEBUG)
      
    •    cupsdLogMessage(CUPSD_LOG_INFO,
      
    •               "Hint: Try setting the LogLevel to \"debug\" to find "
      
    •       "out more.");
      
    • }
    • else
    •  cupsdLogMessage(CUPSD_LOG_DEBUG, "PID %d (%s) exited with no errors.",
      
    •                  pid, name);
      
      }
      }
  3. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions