Date: Tue, 18 Nov 2003 10:34:05 +0200 From: Nikolay Pavlov <temp@roks.biz> To: David Malone <dwmalone@maths.tcd.ie> Cc: freebsd-stable@freebsd.org Subject: Re[2]: PR bin/51253 Message-ID: <345550821.20031118103405@roks.biz> In-Reply-To: <20031116215732.GA96823@walton.maths.tcd.ie> References: <1655795183.20031107160844@roks.biz> <20031116215732.GA96823@walton.maths.tcd.ie>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?345550821.20031118103405>