[BusyBox-cvs] busybox/miscutils crond.c,1.12,1.13

Glenn McGrath bug1 at busybox.net
Sun Feb 22 04:44:24 UTC 2004


Update of /var/cvs/busybox/miscutils
In directory nail:/tmp/cvs-serv30504/miscutils

Modified Files:
	crond.c 
Log Message:
Fixup braces (patch from Thomas Geulig), run through indent and manually 
adjust.


Index: crond.c
===================================================================
RCS file: /var/cvs/busybox/miscutils/crond.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- a/crond.c	23 Dec 2003 07:21:33 -0000	1.12
+++ b/crond.c	22 Feb 2004 04:44:21 -0000	1.13
@@ -51,29 +51,29 @@
 #define CRONUPDATE      "cron.update"
 #endif
 #ifndef MAXLINES
-#define MAXLINES        256             /* max lines in non-root crontabs */
+#define MAXLINES        256	/* max lines in non-root crontabs */
 #endif
 
 typedef struct CronFile {
-    struct CronFile *cf_Next;
-    struct CronLine *cf_LineBase;
-    char        *cf_User;       /* username                     */
[...1695 lines suppressed...]
-	/*
-	 * FORK FAILED
-	 */
-	crondlog("\024couldn't fork, user %s\n", user);
-	pid = 0;
-    }
-    line->cl_Pid = pid;
+		execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL);
+		crondlog("\024unable to exec, user %s cmd %s -c %s\n", user,
+				 DEFAULT_SHELL, line->cl_Shell);
+		exit(0);
+	} else if (pid < 0) {
+		/* FORK FAILED */
+		crondlog("\024couldn't fork, user %s\n", user);
+		pid = 0;
+	}
+	line->cl_Pid = pid;
 }
-#endif /* CONFIG_FEATURE_CROND_CALL_SENDMAIL */
+#endif							/* CONFIG_FEATURE_CROND_CALL_SENDMAIL */




More information about the busybox-cvs mailing list