[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#2449: patch- (was: syslogd stops logging to VT)



Apologies to Martin Schulze for my failure to find the most recent
sysklogd package when making a recent bug report.  Unfortunately the
problems I reported still exist in version 1.3-2.

This self explanatory patch to sysklogd-1.3-2 fixes the problem with syslogd
stopping logging to a VT:
--CUT-HERE--
--- syslogd.c.orig	Sun May 12 11:12:38 1996
+++ syslogd.c	Sun May 12 11:19:10 1996
@@ -1512,8 +1512,13 @@
 			(void) close(f->f_file);
 			/*
 			 * Check for EBADF on TTY's due to vhangup() XXX
+			 * Linux uses EIO (mrn 12 May 96)
 			 */
+#ifdef linux
+			if (e == EIO && f->f_type != F_FILE) {
+#else
 			if (e == EBADF && f->f_type != F_FILE) {
+#endif /* ifdef linux */
 				f->f_file = open(f->f_un.f_fname, O_WRONLY|O_APPEND|O_NOCTTY);
 				if (f->f_file < 0) {
 					f->f_type = F_UNUSED;
--CUT-HERE--

Cheers,

Michael.

--
Michael Nonweiler <mrn20@cam.ac.uk>
Trinity College, Cambridge, England.


Reply to: