scron

simple cron daemon
git clone git://git.2f30.org/scron
Log | Files | Refs | README | LICENSE

commit 1b2cb61e6482c7b0a16fd5933b0a8373b52ab9c3
parent eceef0c1a92efe1862b5d8dabe159b745bb80fa4
Author: Ari Malinen <ari.malinen@gmail.com>
Date:   Wed, 11 Jun 2014 00:28:14 +0300

called syslog before openlog

Diffstat:
Mdcron.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dcron.c b/dcron.c @@ -21,6 +21,9 @@ int main(int argc, char *argv[]) { time_t t; struct tm *tm; + openlog(argv[0], LOG_CONS | LOG_PID, LOG_LOCAL1); + syslog(LOG_NOTICE, "start uid:%d", getuid()); + if (argc > 1 && !strcmp("-h", argv[1])) { fprintf(stderr, "usage: %s [-h = help] [-d = daemon]\n", argv[0]); return 1; @@ -32,9 +35,6 @@ int main(int argc, char *argv[]) { } } - openlog(argv[0], LOG_CONS | LOG_PID, LOG_LOCAL1); - syslog(LOG_NOTICE, "start uid:%d", getuid()); - while (1) { t = time(NULL); tm = localtime(&t);