From 1906cf93f86d8d66f45f90380a8d3da25c087ee5 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Sat, 24 Feb 2007 11:00:05 +0000 Subject: Add the full crosstool-NG sources to the new repository of its own. You might just say: 'Yeah! crosstool-NG's got its own repo!". Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup. That means I'm putting backups in place in the afternoon. That also means we've lost history... :-( --- .../glibc/2.2.2/glibc-2.2.2-syslog-bugfix.patch | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 patches/glibc/2.2.2/glibc-2.2.2-syslog-bugfix.patch (limited to 'patches/glibc/2.2.2/glibc-2.2.2-syslog-bugfix.patch') diff --git a/patches/glibc/2.2.2/glibc-2.2.2-syslog-bugfix.patch b/patches/glibc/2.2.2/glibc-2.2.2-syslog-bugfix.patch new file mode 100644 index 00000000..1a48c00a --- /dev/null +++ b/patches/glibc/2.2.2/glibc-2.2.2-syslog-bugfix.patch @@ -0,0 +1,60 @@ +Backport a bugfix from glibc-2.2.5 to glibc-2.2.2 for the following problem: + When syslog-ng is restarted (or HUPed), vixie-cron (and probably other + programs) stop logging to syslog. + + +2001-08-27 Ulrich Drepper * misc/syslog.c (vsyslog): + Try a bit harder to use syslogd. If the connection went down after we + first used it try to connect again and resend the message before printing + to the console. + +http://sourceware.org/cgi-bin/cvsweb.cgi/libc/misc/Attic/syslog.c.diff?r1=1.32&r2=1.30&cvsroot=glibc +[ paths adjusted ] + +=================================================================== +RCS file: /cvs/glibc/libc/misc/Attic/syslog.c,v +retrieving revision 1.30 +retrieving revision 1.32 +diff -u -r1.30 -r1.32 +--- glibc-2.2.2/misc/syslog.c 2001/08/24 03:21:14 1.30 ++++ glibc-2.2.5/misc/syslog.c 2001/08/30 23:13:49 1.32 +@@ -239,17 +239,29 @@ + + if (!connected || __send(LogFile, buf, bufsize, 0) < 0) + { +- closelog_internal (); /* attempt re-open next time */ +- /* +- * Output the message to the console; don't worry about blocking, +- * if console blocks everything will. Make sure the error reported +- * is the one from the syslogd failure. +- */ +- if (LogStat & LOG_CONS && +- (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0) ++ if (connected) + { +- dprintf (fd, "%s\r\n", buf + msgoff); +- (void)__close(fd); ++ /* Try to reopen the syslog connection. Maybe it went ++ down. */ ++ closelog_internal (); ++ openlog_internal(LogTag, LogStat | LOG_NDELAY, 0); ++ } ++ ++ if (!connected || __send(LogFile, buf, bufsize, 0) < 0) ++ { ++ closelog_internal (); /* attempt re-open next time */ ++ /* ++ * Output the message to the console; don't worry ++ * about blocking, if console blocks everything will. ++ * Make sure the error reported is the one from the ++ * syslogd failure. ++ */ ++ if (LogStat & LOG_CONS && ++ (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0) ++ { ++ dprintf (fd, "%s\r\n", buf + msgoff); ++ (void)__close(fd); ++ } + } + } + -- cgit v1.2.3