X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/bcef8d6fc5b847e912275ddad1d001a336ccdbc9..5dba54ab01bce6ca8a6f1fd64b46cd304501b596:/server/disorderd.c diff --git a/server/disorderd.c b/server/disorderd.c index 612ac28..83d0db0 100644 --- a/server/disorderd.c +++ b/server/disorderd.c @@ -37,7 +37,7 @@ static const struct option options[] = { }; /* display usage message and terminate */ -static void help(void) { +static void attribute((noreturn)) help(void) { xprintf("Usage:\n" " disorderd [OPTIONS]\n" "Options:\n" @@ -208,8 +208,7 @@ int main(int argc, char **argv) { if(!setlocale(LC_CTYPE, "")) disorder_fatal(errno, "error calling setlocale"); /* garbage-collect PCRE's memory */ - pcre_malloc = xmalloc; - pcre_free = xfree; + regexp_setup(); while((n = getopt_long(argc, argv, "hVc:dfP:NsW", options, 0)) >= 0) { switch(n) { case 'h': help(); @@ -224,6 +223,7 @@ int main(int argc, char **argv) { default: disorder_fatal(0, "invalid option"); } } + config_per_user = 0; if(wfr) { if(config_read(1, NULL)) disorder_fatal(0, "cannot read configuration"); @@ -239,7 +239,7 @@ int main(int argc, char **argv) { openlog(progname, LOG_PID, LOG_DAEMON); log_default = &log_syslog; } - disorder_info("process ID %lu", (unsigned long)getpid()); + disorder_info("version "VERSION" process ID %lu", (unsigned long)getpid()); fix_path(); srand(xtime(0)); /* don't start the same every time */ /* gcrypt initialization */