diff options
author | 2004-03-15 19:42:33 +0000 | |
---|---|---|
committer | 2004-03-15 19:42:33 +0000 | |
commit | 3d2bb036466bcdd7a67501a045fa8fb64dba8cff (patch) | |
tree | 8d1daef9fd948077e22dba39bdb02b751f98b04a | |
parent | typo; from robert nagy (diff) | |
download | wireguard-openbsd-3d2bb036466bcdd7a67501a045fa8fb64dba8cff.tar.xz wireguard-openbsd-3d2bb036466bcdd7a67501a045fa8fb64dba8cff.zip |
call daemon(3) early; from tholo@; ok mcbride@
-rw-r--r-- | usr.sbin/ifstated/ifstated.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/ifstated/ifstated.c b/usr.sbin/ifstated/ifstated.c index 2b00a32e241..19304e97814 100644 --- a/usr.sbin/ifstated/ifstated.c +++ b/usr.sbin/ifstated/ifstated.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ifstated.c,v 1.15 2004/03/10 00:09:42 mcbride Exp $ */ +/* $OpenBSD: ifstated.c,v 1.16 2004/03/15 19:42:33 markus Exp $ */ /* * Copyright (c) 2004 Marco Pfatschbacher <mpf@openbsd.org> @@ -125,8 +125,6 @@ main(int argc, char *argv[]) } } - event_init(); - if (opts & IFSD_OPT_NOACTION) { if ((newconf = parse_config(configfile, opts)) == NULL) exit(1); @@ -134,13 +132,14 @@ main(int argc, char *argv[]) exit(0); } - log_init(opt_debug); - if (!opt_debug) { daemon(0, 0); setproctitle(NULL); } + event_init(); + log_init(opt_debug); + signal_set(&sigchld_ev, SIGCHLD, sigchld_handler, &sigchld_ev); signal_add(&sigchld_ev, NULL); |