From owner-freebsd-bugs@FreeBSD.ORG Thu Aug 12 01:10:18 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0925816A4CE for ; Thu, 12 Aug 2004 01:10:18 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD5B143D58 for ; Thu, 12 Aug 2004 01:10:17 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i7C1AHCb011208 for ; Thu, 12 Aug 2004 01:10:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7C1AHa2011207; Thu, 12 Aug 2004 01:10:17 GMT (envelope-from gnats) Resent-Date: Thu, 12 Aug 2004 01:10:17 GMT Resent-Message-Id: <200408120110.i7C1AHa2011207@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "David S. Wang" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8289116A4CE for ; Thu, 12 Aug 2004 01:09:07 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7452343D1F for ; Thu, 12 Aug 2004 01:09:07 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i7C197hw046849 for ; Thu, 12 Aug 2004 01:09:07 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i7C197OF046848; Thu, 12 Aug 2004 01:09:07 GMT (envelope-from nobody) Message-Id: <200408120109.i7C197OF046848@www.freebsd.org> Date: Thu, 12 Aug 2004 01:09:07 GMT From: "David S. Wang" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: bin/70335: inconsistent syslog behavior when max children configured in inetd.conf X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Aug 2004 01:10:18 -0000 >Number: 70335 >Category: bin >Synopsis: inconsistent syslog behavior when max children configured in inetd.conf >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 12 01:10:17 GMT 2004 >Closed-Date: >Last-Modified: >Originator: David S. Wang >Release: 4.7-RELEASE >Organization: Juniper Networks >Environment: FreeBSD blah.juniper.net 4.7-RELEASE FreeBSD 4.7-RELEASE #0: Thu Nov 6 00:57:58 GMT 2003 dsw@blah.juniper.net:/usr/src/sys/compile/GENERIC-DDB i386 >Description: When a service has a maximum number of children configured in inetd.conf, I have found that, when the service exits due to a signal or with a non-zero exit status, that inetd will print to the syslog with something like: inetd[15005]: /usr/libexec/telnetd[15008]: exited, status 1 If no maximum number of children is configured for a service, then this doesn't occur. >How-To-Repeat: Configure inetd.conf to have a finite maximum number of children for a service, and then execute and exit the service. >Fix: I looked at the source and found that se_maxchild is being checked in addchild(): void addchild(struct servtab *sep, pid_t pid) { if (sep->se_maxchild <= 0) <---- return; [...] sep->se_pids[sep->se_numchild++] = pid; [...] This is the only place that se_numchild gets incremented. se_numchild is used later on in logic in reapchild() to print out the above message. If se_maxchild is 0 (never set in inetd.conf), then addchild() never gets to increment se_numchild, and the logic in reapchild() is such that the message never gets printed. I think a simple change in reapchild() to not rely on se_maxchild when printing should solve this problem. >Release-Note: >Audit-Trail: >Unformatted: