sysvinit-devel
[Top][All Lists]
Advanced

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

Re: Bootlogd captured in endless while loop


From: Sven Reschke
Subject: Re: Bootlogd captured in endless while loop
Date: Sun, 28 Jul 2024 19:02:31 +0200
User-agent: Mozilla Thunderbird

Sorry for being hasty.
I tested the patch recommended by Petter, with adjustments to the current bootlogd version.

Looks like it's working, at least I don't have a greedy bootlogd process anymore, and the boot logfile also looks good, with the root cause logged:

...
stty: 'standard input': Input/output error
...

FYI, here's the patchfile I used:

--- sysvinit-3.04.orig/src/bootlogd.c
+++ sysvinit-3.04/src/bootlogd.c
@@ -550,6 +550,7 @@
 #ifndef __linux__    /* BSD-style ioctl needs an argument. */
     int        on = 1;
 #endif
+    int     prev_eio = 0;
     int        considx;
     struct real_cons cons[MAX_CONSOLES];
     int        num_consoles, consoles_left;
@@ -728,8 +729,15 @@
                         if (i >= 0) {
                             m -= i;
                             p += i;
+                            prev_eio = 0;
                             continue;
                         }
+                        /* Don't try to write the same data
+                        * again if we got EIO twice */
+                        if (errno == EIO && prev_eio) {
+                            m = 0;
+                        }
+                        prev_eio = (errno == EIO);
                         /*
                          *    Handle EIO (somebody hung
                          *    up our filedescriptor)


Best regards,
Sven

reply via email to

[Prev in Thread] Current Thread [Next in Thread]