~ubuntu-branches/ubuntu/utopic/cups/utopic

« back to all changes in this revision

Viewing changes to .pc/pidfile.patch/scheduler/main.c

  • Committer: Package Import Robot
  • Author(s): Didier Raboud, Till Kamppeter, Steve Langasek, Didier Raboud
  • Date: 2014-01-03 18:42:39 UTC
  • mfrom: (1.3.2)
  • mto: This revision was merged to the branch mainline in revision 142.
  • Revision ID: package-import@ubuntu.com-20140103184239-juzq32ckr7ra49b3
* New 1.7.0 upstream release

[ Till Kamppeter ]
* Refresh most patches with quilt
* Removed usb-backend-do-not-crash-if-usb-disabled-in-bios and
  cupsd-no-crash-on-avahi-threaded-poll-shutdown patches as they got
  applied upstream
* Removed drop-arch-specifics-from-doc patch as it is not needed
  anymore
* Updated drop_unnecessary_dependencies, manpage-hyphen-minus,
  manpage-translations and ppd-poll-with-client-conf patches manually
  to apply to the new CUPS version
* Added error counting exception from
  usb-backend-do-not-crash-if-usb-disabled-in-bios to
  tests-ignore-warnings
* Install the newly added ippfind utility and its manpage in
  cups-client
* Added pwg.h to libcups2-dev package
* Call dh_auto_clean only if the file Makedefs is present, to avoid a
  FTBFS
* Added color management extensions from Joe Simon's GSoC 2013
  project.
* Patch cups-files.conf to activate CUPS daemon syncing of files when
  closing, so that config files (like printers.conf) do not
  mysteriously disappear (LP: #1157972)
* In the AppArmor profile, allow execution of programs in
  /etc/cups/interfaces/, needed to make CUPS working with queues based
  on System V interface scripts, especially PPD-less queues
  auto-generated by cups-browsed from cups-filters 1.0.41 on.
* Silenced AppArmor noise from udev.conf in syslog (LP: #1229766)

[ Steve Langasek ]
* Add cups-filters (>= 1.0.42) as alternative to foomatic-filters
  (which is deprecated) in package relationships

[ Didier Raboud ]
* Remove Roger Leigh from uploaders on his request with thanks for his
  past work!
* Switch avahi LSB Should-Start dependency to be avahi-daemon; also
  bump package relationship to >= 0.6.31-3~ (Closes: #731608)
* Refresh the manpage translation files
* Move the USB backend quirk rules file to cups-server-common
* Add 38 new 1.7.0 libcups2 symbols
* Mark one C++ libcupsppdc1 symbol as optional as it isn't exported in
  1.7.0 anymore
* Import Fedora patches:
  - to avoid sign-extending CRCs in gz decompression
  - to build with full read-only relocations
  - to fix job history logging (upstream patch)
  - to set the internal default for SyncOnClose to Yes, instead of
    only configuring it to Yes
  - to fix a stringpool corruption issue
  - to prevent USB timeouts causing incorrect print output
* Import Fedora patch updates:
  - to dont-use-dbus-from-two-threads patch so it removes a call to
    avahi_threaded_poll_stop()
  - to avoid_stale_lockfile_in_dbus_notifier patch to call _exit when
    handling SIGTERM
* Move manpage-translations patch at the very end of the patch series
  to have it include all our patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * "$Id: main.c 11173 2013-07-23 12:31:34Z msweet $"
 
2
 * "$Id: main.c 10996 2013-05-29 11:51:34Z msweet $"
3
3
 *
4
4
 *   Main loop for the CUPS scheduler.
5
5
 *
134
134
#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
135
135
  struct sigaction      action;         /* Actions for POSIX signals */
136
136
#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
137
 
#ifdef __sgi
138
 
  cups_file_t           *fp;            /* Fake lpsched lock file */
139
 
  struct stat           statbuf;        /* Needed for checking lpsched FIFO */
140
 
#endif /* __sgi */
141
137
  int                   run_as_child = 0;
142
138
                                        /* Needed for background fork/exec */
143
139
#ifdef __APPLE__
325
321
    }
326
322
 
327
323
  if (!ConfigurationFile)
328
 
  {
329
324
    cupsdSetString(&ConfigurationFile, CUPS_SERVERROOT "/cupsd.conf");
330
 
    cupsdSetString(&CupsFilesFile, CUPS_SERVERROOT "/cups-files.conf");
331
 
  }
332
325
 
333
326
  if (!CupsFilesFile)
334
327
  {
618
611
  signal(SIGTERM, sigterm_handler);
619
612
#endif /* HAVE_SIGSET */
620
613
 
621
 
#ifdef __sgi
622
 
 /*
623
 
  * Try to create a fake lpsched lock file if one is not already there.
624
 
  * Some Adobe applications need it under IRIX in order to enable
625
 
  * printing...
626
 
  */
627
 
 
628
 
  if ((fp = cupsFileOpen("/var/spool/lp/SCHEDLOCK", "w")) == NULL)
629
 
  {
630
 
    syslog(LOG_LPR, "Unable to create fake lpsched lock file "
631
 
                    "\"/var/spool/lp/SCHEDLOCK\"\' - %s!",
632
 
           strerror(errno));
633
 
  }
634
 
  else
635
 
  {
636
 
    fchmod(cupsFileNumber(fp), 0644);
637
 
    fchown(cupsFileNumber(fp), User, Group);
638
 
 
639
 
    cupsFileClose(fp);
640
 
  }
641
 
#endif /* __sgi */
642
 
 
643
614
 /*
644
615
  * Initialize authentication certificates...
645
616
  */
1167
1138
    cupsdStopSystemMonitor();
1168
1139
#endif /* __APPLE__ */
1169
1140
 
1170
 
#ifdef __sgi
1171
 
 /*
1172
 
  * Remove the fake IRIX lpsched lock file, but only if the existing
1173
 
  * file is not a FIFO which indicates that the real IRIX lpsched is
1174
 
  * running...
1175
 
  */
1176
 
 
1177
 
  if (!stat("/var/spool/lp/FIFO", &statbuf))
1178
 
    if (!S_ISFIFO(statbuf.st_mode))
1179
 
      unlink("/var/spool/lp/SCHEDLOCK");
1180
 
#endif /* __sgi */
1181
 
 
1182
1141
  cupsdStopSelect();
1183
1142
 
1184
1143
  return (!stop_scheduler);
1493
1452
        lis->fd = fd;
1494
1453
 
1495
1454
#  ifdef HAVE_SSL
1496
 
        if (_httpAddrPort(&(lis->address)) == 443)
 
1455
        if (httpAddrPort(&(lis->address)) == 443)
1497
1456
          lis->encryption = HTTP_ENCRYPT_ALWAYS;
1498
1457
#  endif /* HAVE_SSL */
1499
1458
      }
2066
2025
 
2067
2026
 
2068
2027
/*
2069
 
 * End of "$Id: main.c 11173 2013-07-23 12:31:34Z msweet $".
 
2028
 * End of "$Id: main.c 10996 2013-05-29 11:51:34Z msweet $".
2070
2029
 */