summaryrefslogtreecommitdiff
path: root/usr.sbin/inetd/inetd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-28 17:50:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-28 17:50:10 +0000
commitb4a8e14bbb57716235b35101143c09ba8ab2f590 (patch)
treea97616a8d147cf112f7c375ab77ee1760f487eed /usr.sbin/inetd/inetd.c
parente87e8335fcd27b7242514d7fb4665631ac13ceb9 (diff)
closelog() before we trash the syslog descriptor; suggestion from alan@parsys.co.uk
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r--usr.sbin/inetd/inetd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index ac5e636f138..673c7612254 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: inetd.c,v 1.4 1996/06/12 07:23:26 deraadt Exp $ */
+/* $OpenBSD: inetd.c,v 1.5 1996/06/28 17:50:09 deraadt Exp $ */
/* $NetBSD: inetd.c,v 1.11 1996/02/22 11:14:41 mycroft Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
@@ -41,7 +41,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/
-static char rcsid[] = "$OpenBSD: inetd.c,v 1.4 1996/06/12 07:23:26 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: inetd.c,v 1.5 1996/06/28 17:50:09 deraadt Exp $";
#endif /* not lint */
/*
@@ -480,6 +480,7 @@ main(argc, argv, envp)
syslog(LOG_ERR,"setrlimit: %m");
}
#endif
+ closelog();
for (tmpint = rlim_ofile_cur-1; --tmpint > 2; )
(void)close(tmpint);
execv(sep->se_server, sep->se_argv);