~ubuntu-branches/ubuntu/jaunty/cups/jaunty-proposed

« back to all changes in this revision

Viewing changes to scheduler/main.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2008-07-23 08:58:57 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080723085857-snar5iirwgr0djnc
Tags: 1.3.8-1
* New upstream release: some 20 bug fixes, no new features (see
  http://www.cups.org/articles.php?L562 for details).
* Dropped patches, accepted upstream:
  - empty_option_value_crash.dpatch
  - CVE-2008-1722.dpatch
  - glibc2.8_build.dpatch
  - HostNameLookups_values.dpatch
* manpage-typos.dpatch: Most of this got applied to 1.3.8. The ".Sh" ->
  ".SS" fix only got applied to trunk, so backport these remaining ones.
* manpage-translations.dpatch: Update to new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: main.c 7393 2008-03-21 21:36:40Z mike $"
 
2
 * "$Id: main.c 7725 2008-07-14 06:16:34Z mike $"
3
3
 *
4
4
 *   Scheduler main loop for the Common UNIX Printing System (CUPS).
5
5
 *
910
910
#endif /* HAVE_LDAP */
911
911
    }
912
912
 
913
 
    if (Browsing && BrowseLocalProtocols && current_time > browse_time)
 
913
    if (Browsing && current_time > browse_time)
914
914
    {
915
915
      cupsdSendBrowseList();
916
916
      browse_time = current_time;
1601
1601
 
1602
1602
    cupsdFinishProcess(pid, name, sizeof(name));
1603
1603
 
1604
 
    if (status == SIGTERM)
1605
 
      status = 0;
1606
 
 
1607
 
    if (status)
1608
 
    {
1609
 
      if (WIFEXITED(status))
1610
 
        cupsdLogMessage(CUPSD_LOG_ERROR, "PID %d (%s) stopped with status %d!",
1611
 
                        pid, name, WEXITSTATUS(status));
1612
 
      else
1613
 
        cupsdLogMessage(CUPSD_LOG_ERROR, "PID %d (%s) crashed on signal %d!",
1614
 
                        pid, name, WTERMSIG(status));
1615
 
 
1616
 
      if (LogLevel < CUPSD_LOG_DEBUG)
1617
 
        cupsdLogMessage(CUPSD_LOG_INFO,
1618
 
                        "Hint: Try setting the LogLevel to \"debug\" to find "
1619
 
                        "out more.");
1620
 
    }
1621
 
    else
1622
 
      cupsdLogMessage(CUPSD_LOG_DEBUG, "PID %d (%s) exited with no errors.",
1623
 
                      pid, name);
1624
 
 
1625
1604
   /*
1626
1605
    * Delete certificates for CGI processes...
1627
1606
    */
1653
1632
          else
1654
1633
            job->backend = -pid;
1655
1634
 
 
1635
          if (job->state_value == IPP_JOB_CANCELED)
 
1636
            status = 0;                 /* Ignore errors when canceling jobs */
 
1637
 
1656
1638
          if (status && job->status >= 0)
1657
1639
          {
1658
1640
           /*
1700
1682
          break;
1701
1683
        }
1702
1684
      }
 
1685
 
 
1686
   /*
 
1687
    * Show the exit status as needed...
 
1688
    */
 
1689
 
 
1690
    if (status == SIGTERM)
 
1691
      status = 0;
 
1692
 
 
1693
    if (status)
 
1694
    {
 
1695
      if (WIFEXITED(status))
 
1696
        cupsdLogMessage(CUPSD_LOG_ERROR, "PID %d (%s) stopped with status %d!",
 
1697
                        pid, name, WEXITSTATUS(status));
 
1698
      else
 
1699
        cupsdLogMessage(CUPSD_LOG_ERROR, "PID %d (%s) crashed on signal %d!",
 
1700
                        pid, name, WTERMSIG(status));
 
1701
 
 
1702
      if (LogLevel < CUPSD_LOG_DEBUG)
 
1703
        cupsdLogMessage(CUPSD_LOG_INFO,
 
1704
                        "Hint: Try setting the LogLevel to \"debug\" to find "
 
1705
                        "out more.");
 
1706
    }
 
1707
    else
 
1708
      cupsdLogMessage(CUPSD_LOG_DEBUG, "PID %d (%s) exited with no errors.",
 
1709
                      pid, name);
1703
1710
  }
1704
1711
}
1705
1712
 
1974
1981
 
1975
1982
 
1976
1983
/*
1977
 
 * End of "$Id: main.c 7393 2008-03-21 21:36:40Z mike $".
 
1984
 * End of "$Id: main.c 7725 2008-07-14 06:16:34Z mike $".
1978
1985
 */