From owner-freebsd-stable@FreeBSD.ORG Tue Nov 18 00:43:12 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BBD716A4CE for ; Tue, 18 Nov 2003 00:43:12 -0800 (PST) Received: from pathfinder.roks.biz (roks.biz [212.110.133.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52ACA43FDF for ; Tue, 18 Nov 2003 00:43:05 -0800 (PST) (envelope-from temp@roks.biz) Received: from admin.office.roks.biz (admin.office.roks.biz [192.168.100.103]) by pathfinder.roks.biz (8.12.9p2/8.12.9) with ESMTP id hAI8YAwU048295; Tue, 18 Nov 2003 10:34:15 +0200 (EET) (envelope-from temp@roks.biz) Date: Tue, 18 Nov 2003 10:34:05 +0200 From: Nikolay Pavlov X-Mailer: The Bat! (v1.61) X-Priority: 3 (Normal) Message-ID: <345550821.20031118103405@roks.biz> To: David Malone In-Reply-To: <20031116215732.GA96823@walton.maths.tcd.ie> References: <1655795183.20031107160844@roks.biz> <20031116215732.GA96823@walton.maths.tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-stable@freebsd.org Subject: Re[2]: PR bin/51253 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Nikolay Pavlov List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Nov 2003 08:43:12 -0000 Hi, David. DM> I've just committed the following patch to -current, which I think DM> should fix your problem (and other similar potential problems). DM> I'll MFC the fix in a couple of weeks, all going according to plan. DM> David. DM> Index: syslogd.c DM> =================================================================== DM> RCS file: /cvs/FreeBSD-CVS/src/usr.sbin/syslogd/syslogd.c,v DM> retrieving revision 1.116 DM> diff -u -r1.116 syslogd.c DM> --- syslogd.c 17 May 2003 20:07:54 -0000 1.116 DM> +++ syslogd.c 16 Nov 2003 20:45:40 -0000 DM> @@ -1338,7 +1338,12 @@ DM> logerror(const char *type) DM> { DM> char buf[512]; DM> + static int recursed = 0; DM> + /* If there's an error while trying to log an error, give up. */ DM> + if (recursed) DM> + return; DM> + recursed++; DM> if (errno) DM> (void)snprintf(buf, DM> sizeof buf, "syslogd: %s: %s", type, strerror(errno)); DM> @@ -1347,6 +1352,7 @@ DM> errno = 0; DM> dprintf("%s\n", buf); DM> logmsg(LOG_SYSLOG|LOG_ERR, buf, LocalHostName, ADDDATE); DM> + recursed--; DM> } DM> static void Your patch works excellent for my 4.9 box, thanks that found time for this. -- Thanks, Nikolay.