summaryrefslogtreecommitdiff
path: root/scheduler
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2009-03-09 21:13:04 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2009-03-09 21:13:04 +0000
commitd7871c8c7f9667f783d4313a282b4d8a4d8f529e (patch)
treec5c1786f41e3b32ac1e9acddf76f7592e0b103de /scheduler
parent1340db2dab0b5ac933dec4796637ca3baa10bb4b (diff)
Merge trademark/logo changes from CUPS 1.4svn-r8418.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@1283 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler')
-rw-r--r--scheduler/cupsd.h1
-rw-r--r--scheduler/job.c14
-rw-r--r--scheduler/main.c18
3 files changed, 32 insertions, 1 deletions
diff --git a/scheduler/cupsd.h b/scheduler/cupsd.h
index 8da2d9616..f71225b07 100644
--- a/scheduler/cupsd.h
+++ b/scheduler/cupsd.h
@@ -193,6 +193,7 @@ VAR PSQUpdateQuotaProcPtr PSQUpdateQuotaProc
* Prototypes...
*/
+extern void cupsdCheckProcess(void);
extern void cupsdClearString(char **s);
extern void cupsdHoldSignals(void);
extern void cupsdReleaseSignals(void);
diff --git a/scheduler/job.c b/scheduler/job.c
index cd185c473..5adf0e050 100644
--- a/scheduler/job.c
+++ b/scheduler/job.c
@@ -4004,10 +4004,24 @@ update_job(cupsd_job_t *job) /* I - Job to check */
for (i = 0; job->filters[i] < 0; i ++);
if (job->filters[i])
+ {
+ /*
+ * EOF but we haven't collected the exit status of all filters...
+ */
+
+ cupsdCheckProcess();
return;
+ }
if (job->current_file >= job->num_files && job->backend > 0)
+ {
+ /*
+ * EOF but we haven't collected the exit status of the backend...
+ */
+
+ cupsdCheckProcess();
return;
+ }
/*
* Handle the end of job stuff...
diff --git a/scheduler/main.c b/scheduler/main.c
index ccc395211..d78280f98 100644
--- a/scheduler/main.c
+++ b/scheduler/main.c
@@ -147,7 +147,8 @@ main(int argc, /* I - Number of command-line args */
#ifdef __APPLE__
int run_as_child = 0,
/* Needed for Mac OS X fork/exec */
- use_sysman = 1; /* Use system management functions? */
+ use_sysman = !getuid();
+ /* Use system management functions? */
#else
time_t netif_time = 0; /* Time since last network update */
#endif /* __APPLE__ */
@@ -1214,6 +1215,21 @@ main(int argc, /* I - Number of command-line args */
/*
+ * 'cupsdCheckProcess()' - Tell the main loop to check for dead children.
+ */
+
+void
+cupsdCheckProcess(void)
+{
+ /*
+ * Flag that we have dead children...
+ */
+
+ dead_children = 1;
+}
+
+
+/*
* 'cupsdClosePipe()' - Close a pipe as necessary.
*/