From 2fcfe9354548ea576e9c5106cdea3dc6bb3748dcb72f40df2fa994d8456c5d82 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 19 Apr 2011 12:17:03 +0000 Subject: [PATCH] . OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=120 --- showconsole-1.14.dif | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/showconsole-1.14.dif b/showconsole-1.14.dif index c9a155e..c88c368 100644 --- a/showconsole-1.14.dif +++ b/showconsole-1.14.dif @@ -127,7 +127,7 @@ .TP .I /dev/console --- libconsole.c -+++ libconsole.c 2011-04-19 11:59:52.812425484 +0000 ++++ libconsole.c 2011-04-19 12:16:38.307927219 +0000 @@ -59,6 +59,22 @@ #include "listing.h" @@ -307,7 +307,22 @@ error ("select(): %m\n"); goto nothing; } -@@ -998,20 +1019,14 @@ void closeIO(void) +@@ -898,8 +919,12 @@ void safeIO (void) + (*vr_access)(); + vr_access = NULL; + } +- if ((flog = fdopen (log, "a")) == NULL) +- error("Can not open %s: %m\n", BOOT_LOGFILE); ++ lock(&llock); ++ if ((flog = fdopen (log, "a")) == NULL) { ++ unlock(&llock); ++ error("Can not open %s: %m\n", BOOT_LOGFILE); ++ } ++ unlock(&llock); + + nsigio = SIGIO; /* We do not need a signal handler */ + (void)signal(SIGIO, SIG_IGN); +@@ -998,20 +1023,16 @@ void closeIO(void) pthread_cancel(lthread); } @@ -329,13 +344,15 @@ + fputc('\n', flog); + (void)fclose(flog); + } ++ lock(&llock); flog = NULL; -xout: ++ unlock(&llock); + if (fdfifo >= 0) { close(fdfifo); fdfifo = -1; -@@ -1101,7 +1116,7 @@ static dev_t fallback(const pid_t pid, c +@@ -1101,7 +1122,7 @@ static dev_t fallback(const pid_t pid, c printf("|%u|%u|", tty, ttypgrp); /* stdout to pipe synchronize ... */ @@ -344,7 +361,7 @@ } break; case -1: error("can not execute: %m\n"); -@@ -1463,6 +1478,10 @@ static void consalloc(struct console *re +@@ -1463,6 +1484,10 @@ static void consalloc(struct console *re return; } tail->next = newc;