cron_sync();
timeRunning = virtualTime = clockTime;
		run_reboot_jobs __P((cron_db *)),		cron_tick __P((cron_db *)),		cron_sync __P((void)),		cron_sleep __P((void)),#ifdef USE_SIGCHLD		sigchld_handler __P((int)),#endif		sighup_handler __P((int)),		parse_args __P((int c, char *v[]));static voidusage() {	char **dflags;	fprintf(stderr, "usage:  %s [-x [", ProgramName);	for(dflags = DebugFlagNames; *dflags; dflags++)		fprintf(stderr, "%s%s", *dflags, dflags[1] ? "," : "]");	fprintf(stderr, "]\n");	exit(ERROR_EXIT);}intmain(argc, argv)	int	argc;	char	*argv[];{	cron_db	database;	ProgramName = argv[0];#if defined(BSD)	setlinebuf(stdout);	setlinebuf(stderr);#endif	parse_args(argc, argv);#ifdef USE_SIGCHLD	(void) signal(SIGCHLD, sigchld_handler);#else	(void) signal(SIGCLD, SIG_IGN);#endif	(void) signal(SIGHUP, sighup_handler);	acquire_daemonlock(0);	set_cron_uid();	set_cron_cwd();#if defined(POSIX)	setenv("PATH", _PATH_DEFPATH, 1);#endif	/* if there are no debug flags turned on, fork as a daemon should.	 */# if DEBUGGING	if (DebugFlags) {# else	if (0) {# endif		(void) fprintf(stderr, "[%d] cron started\n", getpid());	} else {		switch (fork()) {		case -1:			log_it("CRON",getpid(),"DEATH","can't fork");			exit(0);			break;		case 0:			/* child process */			log_it("CRON",getpid(),"STARTUP","fork ok");			(void) setsid();			break;		default:			/* parent process should just die */			_exit(0);		}	}	acquire_daemonlock(0);	database.head = NULL;	database.tail = NULL;	database.mtime = (time_t) 0;	load_database(&database);	run_reboot_jobs(&database);	cron_sync();	while (TRUE) {# if DEBUGGING		if (!(DebugFlags & DTEST))# endif /*DEBUGGING*/			cron_sleep();		load_database(&database);		/* do this iteration		 */		cron_tick(&database);		/* sleep 1 minute		 */		TargetTime += 60;	}}static voidrun_reboot_jobs(db)	cron_db *db;{	register user		*u;	register entry		*e;	for (u = db->head;  u != NULL;  u = u->next) {		for (e = u->crontab;  e != NULL;  e = e->next) {			if (e->flags & WHEN_REBOOT) {				job_add(e, u);			}		}	}	(void) job_runqueue();}