From 0e48d9308ec10d44f37885f0c74cc805cefee52d Mon Sep 17 00:00:00 2001 From: kstailey Date: Tue, 22 Jul 1997 17:00:06 +0000 Subject: daemonize if using syslog(3) --- usr.sbin/ipmon/ipmon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.sbin/ipmon/ipmon.c') 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 #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) { -- cgit v1.2.3