View | Details | Raw Unified | Return to bug 19477
Collapse All | Expand All

(-)scheduler/conf.c.orig (-1 / +3 lines)
Lines 169-175 Link Here
169
#endif /* HAVE_AUTHORIZATION_H */
169
#endif /* HAVE_AUTHORIZATION_H */
170
  { "TempDir",			&TempDir,		CUPSD_VARTYPE_PATHNAME },
170
  { "TempDir",			&TempDir,		CUPSD_VARTYPE_PATHNAME },
171
  { "Timeout",			&Timeout,		CUPSD_VARTYPE_INTEGER },
171
  { "Timeout",			&Timeout,		CUPSD_VARTYPE_INTEGER },
172
  { "UseNetworkDefault",	&UseNetworkDefault,	CUPSD_VARTYPE_BOOLEAN }
172
  { "UseNetworkDefault",	&UseNetworkDefault,	CUPSD_VARTYPE_BOOLEAN },
173
  { "PidFile",			&PidFile,		CUPSD_VARTYPE_STRING }
173
};
174
};
174
#define NUM_VARS	(sizeof(variables) / sizeof(variables[0]))
175
#define NUM_VARS	(sizeof(variables) / sizeof(variables[0]))
175
176
Lines 434-439 Link Here
434
  cupsdSetString(&RemoteRoot, "remroot");
435
  cupsdSetString(&RemoteRoot, "remroot");
435
  cupsdSetString(&ServerHeader, "CUPS/1.3");
436
  cupsdSetString(&ServerHeader, "CUPS/1.3");
436
  cupsdSetString(&StateDir, CUPS_STATEDIR);
437
  cupsdSetString(&StateDir, CUPS_STATEDIR);
438
  cupsdSetString(&PidFile, "/var/run/cups/cupsd.pid");
437
#ifdef HAVE_GSSAPI
439
#ifdef HAVE_GSSAPI
438
  cupsdSetString(&GSSServiceName, CUPS_DEFAULT_GSSSERVICENAME);
440
  cupsdSetString(&GSSServiceName, CUPS_DEFAULT_GSSSERVICENAME);
439
#endif /* HAVE_GSSAPI */
441
#endif /* HAVE_GSSAPI */
(-)scheduler/conf.h.orig (+1 lines)
Lines 189-194 Link Here
189
					/* Server key file */
189
					/* Server key file */
190
#  endif /* HAVE_LIBSSL || HAVE_GNUTLS */
190
#  endif /* HAVE_LIBSSL || HAVE_GNUTLS */
191
#endif /* HAVE_SSL */
191
#endif /* HAVE_SSL */
192
VAR char		*PidFile	VALUE(NULL); /* Debian CUPS pid file */
192
193
193
#ifdef HAVE_LAUNCHD
194
#ifdef HAVE_LAUNCHD
194
VAR int			LaunchdTimeout		VALUE(DEFAULT_TIMEOUT);
195
VAR int			LaunchdTimeout		VALUE(DEFAULT_TIMEOUT);
(-)scheduler/main.c.orig (+37 lines)
Lines 89-94 Link Here
89
static void		sigterm_handler(int sig);
89
static void		sigterm_handler(int sig);
90
static long		select_timeout(int fds);
90
static long		select_timeout(int fds);
91
static void		usage(int status);
91
static void		usage(int status);
92
int			write_pid(void);
93
int			remove_pid(void);
92
94
93
95
94
/*
96
/*
Lines 596-601 Link Here
596
  }
598
  }
597
#endif /* __sgi */
599
#endif /* __sgi */
598
600
601
  if (write_pid() == 0) {
602
    cupsdLogMessage(CUPSD_LOG_ERROR, "Unable to write pid file");
603
    return (1);
604
  }
605
599
 /*
606
 /*
600
  * Initialize authentication certificates...
607
  * Initialize authentication certificates...
601
  */
608
  */
Lines 1182-1190 Link Here
1182
1189
1183
  cupsdStopSelect();
1190
  cupsdStopSelect();
1184
1191
1192
  remove_pid();
1193
1185
  return (!stop_scheduler);
1194
  return (!stop_scheduler);
1186
}
1195
}
1187
1196
1197
/* 'write_pid()' - Write PID file.
1198
   'remove_pid()' - Delete PID file.
1199
*/
1200
int
1201
write_pid()
1202
{
1203
  FILE *f;
1204
  int fd;
1205
  int pid;
1206
  if (((fd = open(PidFile, O_RDWR|O_CREAT, 0644)) == -1)
1207
      || ((f = fdopen(fd, "r+")) == NULL) ) {
1208
    return 0;
1209
  }
1210
  pid = getpid();
1211
  if (!fprintf(f, "%d\n", pid)) {
1212
    close(fd);
1213
    return 0;
1214
  }
1215
  fflush(f);
1216
  close(fd);
1217
1218
  return pid;
1219
}
1220
1221
int remove_pid() {
1222
  return unlink(PidFile);
1223
}
1224
1188
1225
1189
/*
1226
/*
1190
 * 'cupsdClosePipe()' - Close a pipe as necessary.
1227
 * 'cupsdClosePipe()' - Close a pipe as necessary.
(-)test/run-stp-tests.sh.orig (+1 lines)
Lines 307-312 Link Here
307
DocumentRoot $root/doc
307
DocumentRoot $root/doc
308
RequestRoot /tmp/cups-$user/spool
308
RequestRoot /tmp/cups-$user/spool
309
TempDir /tmp/cups-$user/spool/temp
309
TempDir /tmp/cups-$user/spool/temp
310
PidFile /tmp/cups-$user/cupsd.pid
310
MaxLogSize 0
311
MaxLogSize 0
311
AccessLog /tmp/cups-$user/log/access_log
312
AccessLog /tmp/cups-$user/log/access_log

Return to bug 19477