diff options
author | kstailey <kstailey@cvs.openbsd.org> | 1997-07-22 17:00:06 +0000 |
---|---|---|
committer | kstailey <kstailey@cvs.openbsd.org> | 1997-07-22 17:00:06 +0000 |
commit | 0e48d9308ec10d44f37885f0c74cc805cefee52d (patch) | |
tree | 059e242eb98be30fa5dceb39f6ca80a9230e1021 /usr.sbin/ipmon/ipmon.c | |
parent | 963815b85bef064f335066155e41c887596a6e01 (diff) |
daemonize if using syslog(3)
Diffstat (limited to 'usr.sbin/ipmon/ipmon.c')
-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) { |