diff options
author | 1997-07-22 17:00:05 +0000 | |
---|---|---|
committer | 1997-07-22 17:00:05 +0000 | |
commit | 8d504e1fae5e480c2aa8c378ace79e74ba53a79a (patch) | |
tree | 85a06d5b2a51bdec687cdd5ffd83f1e196386c3d | |
parent | tabify, use NULL for ptr ops, not 0 (diff) | |
download | wireguard-openbsd-8d504e1fae5e480c2aa8c378ace79e74ba53a79a.tar.xz wireguard-openbsd-8d504e1fae5e480c2aa8c378ace79e74ba53a79a.zip |
daemonize if using syslog(3)
-rw-r--r-- | usr.sbin/ipmon/ipmon.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ipmon/ipmon.c b/usr.sbin/ipmon/ipmon.c index 595c0406e40..e882089b9b8 100644 --- a/usr.sbin/ipmon/ipmon.c +++ b/usr.sbin/ipmon/ipmon.c @@ -41,7 +41,7 @@ #include <ctype.h> #if !defined(lint) && defined(LIBC_SCCS) -static char rcsid[] = "$Id: ipmon.c,v 1.9 1997/06/23 16:53:59 kstailey Exp $"; +static char rcsid[] = "$Id: ipmon.c,v 1.10 1997/07/22 17:00:05 kstailey Exp $"; #endif #include "ip_fil_compat.h" @@ -548,6 +548,8 @@ char *argv[]; if (!(opts & OPT_SYSLOG)) { log = argv[optind] ? fopen(argv[optind], "a") : stdout; setvbuf(log, NULL, _IONBF, 0); + } else { + daemon(0, 0); } if (flushed) { |