SOURCES: vixie-cron-foreground.patch - updated just to maintain ba...
prism
prism at pld-linux.org
Mon Jul 25 12:48:24 CEST 2005
Author: prism Date: Mon Jul 25 10:48:24 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- updated just to maintain backward compatibility.
- the -f switch is deprecated, use -n instead (nofork)
---- Files affected:
SOURCES:
vixie-cron-foreground.patch (1.1 -> 1.2)
---- Diffs:
================================================================
Index: SOURCES/vixie-cron-foreground.patch
diff -u SOURCES/vixie-cron-foreground.patch:1.1 SOURCES/vixie-cron-foreground.patch:1.2
--- SOURCES/vixie-cron-foreground.patch:1.1 Wed Feb 4 18:59:19 2004
+++ SOURCES/vixie-cron-foreground.patch Mon Jul 25 12:48:19 2005
@@ -1,61 +1,44 @@
-diff -dur vixie-cron-3.0.1.orig/cron.8 vixie-cron-3.0.1/cron.8
---- vixie-cron-3.0.1.orig/cron.8 2004-02-04 18:52:42.000000000 +0100
-+++ vixie-cron-3.0.1/cron.8 2004-02-04 18:56:05.301192530 +0100
-@@ -25,8 +25,8 @@
- cron
- .SH DESCRIPTION
- .I Cron
--should be started from /etc/rc or /etc/rc.local. It will return immediately,
--so you don't need to start it with '&'.
-+should be started from /etc/rc or /etc/rc.local. Unless you run it with -f option
-+it will return immediately, so you don't need to start it with '&'.
+diff -uNr vixie-cron-4.1.p23/cron.8 vixie-cron-4.1/cron.8
+--- vixie-cron-4.1.p23/cron.8 2005-07-24 22:34:43.000000000 +0200
++++ vixie-cron-4.1/cron.8 2005-07-25 00:38:08.000000000 +0200
+@@ -33,7 +33,8 @@
+ should be started from /etc/rc or /etc/rc.local. It will return immediately,
+ so you don't need to start it with '&'. The \-n option changes this default
+ behavior causing it to run in the foreground. This can be useful when
+-starting it out of init.
++starting it out of init. For backward compatibility, the \-f option exists
++as an alias to \-n, but it's usage is deprecated and not recommended.
.PP
.I Cron
searches /var/spool/cron for crontab files which are named after accounts in
-diff -dur vixie-cron-3.0.1.orig/cron.c vixie-cron-3.0.1/cron.c
---- vixie-cron-3.0.1.orig/cron.c 2004-02-04 18:52:42.000000000 +0100
-+++ vixie-cron-3.0.1/cron.c 2004-02-04 18:55:08.452093305 +0100
-@@ -32,6 +32,7 @@
- # include <time.h>
- #endif
-
-+int foreground=0;
-
- static void usage __P((void)),
- run_reboot_jobs __P((cron_db *)),
-@@ -47,7 +48,7 @@
+diff -uNr vixie-cron-4.1.p23/cron.c vixie-cron-4.1/cron.c
+--- vixie-cron-4.1.p23/cron.c 2005-07-24 23:59:50.000000000 +0200
++++ vixie-cron-4.1/cron.c 2005-07-25 00:37:04.000000000 +0200
+@@ -48,7 +48,7 @@
+ usage(void) {
+ const char **dflags;
- static void
- usage() {
-- fprintf(stderr, "usage: %s [-x debugflag[,...]]\n", ProgramName);
-+ fprintf(stderr, "usage: %s [-f] [-x debugflag[,...]]\n", ProgramName);
- exit(ERROR_EXIT);
- }
+- fprintf(stderr, "usage: %s [-n] [-x [", ProgramName);
++ fprintf(stderr, "usage: %s [-f] [-n] [-x [", ProgramName);
+ for (dflags = DebugFlagNames; *dflags; dflags++)
+ fprintf(stderr, "%s%s", *dflags, dflags[1] ? "," : "]");
+ fprintf(stderr, "]\n");
+@@ -434,7 +434,7 @@
+ parse_args(int argc, char *argv[]) {
+ int argch;
-@@ -86,9 +87,9 @@
- /* if there are no debug flags turned on, fork as a daemon should.
- */
- # if DEBUGGING
-- if (DebugFlags) {
-+ if (DebugFlags||foreground) {
- # else
-- if (0) {
-+ if (foreground) {
- # endif
- (void) fprintf(stderr, "[%d] cron started\n", getpid());
- } else {
-@@ -293,10 +294,13 @@
- {
- int argch;
-
-- while (EOF != (argch = getopt(argc, argv, "x:"))) {
-+ while (EOF != (argch = getopt(argc, argv, "fx:"))) {
+- while (-1 != (argch = getopt(argc, argv, "nx:"))) {
++ while (-1 != (argch = getopt(argc, argv, "fnx:"))) {
switch (argch) {
default:
usage();
-+ case 'f':
-+ foreground=1;
-+ break;
- case 'x':
+@@ -442,6 +442,9 @@
if (!set_debug_flags(optarg))
usage();
+ break;
++ case 'f':
++ fprintf(stderr, "Warning: the -f option is deprecated. Use -n instead.\n");
++ /* fall-trough */
+ case 'n':
+ NoFork = 1;
+ break;
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SOURCES/vixie-cron-foreground.patch?r1=1.1&r2=1.2&f=u
More information about the pld-cvs-commit
mailing list