Source-Changes-HG archive

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

[src/trunk]: src/etc Send a "nop" metadata message to the postprocessor every...



details:   https://anonhg.NetBSD.org/src/rev/6d298a1071c6
branches:  trunk
changeset: 328601:6d298a1071c6
user:      apb <apb%NetBSD.org@localhost>
date:      Wed Apr 09 12:45:05 2014 +0000

description:
Send a "nop" metadata message to the postprocessor every few seconds,
to flush partial output lines.  This should help with PR 48714.

diffstat:

 etc/rc |  16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r 28d6c10640bf -r 6d298a1071c6 etc/rc
--- a/etc/rc    Wed Apr 09 12:38:09 2014 +0000
+++ b/etc/rc    Wed Apr 09 12:45:05 2014 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: rc,v 1.167 2014/04/09 12:38:09 apb Exp $
+# $NetBSD: rc,v 1.168 2014/04/09 12:45:05 apb Exp $
 #
 # rc --
 #      Run the scripts in /etc/rc.d with rcorder, and log output
@@ -119,6 +119,20 @@
        kill -0 $RC_PID >/dev/null 2>&1 || RC_PID=$$
 
        #
+       # As long as process $RC_PID is still running, send a "nop"
+       # metadata message to the postprocessor every few seconds.
+       # This should help flush partial lines that may appear when
+       # rc.d scripts that are NOT marked with "KEYWORD: interactive"
+       # nevertheless attempt to print prompts and wait for input.
+       #
+       (
+           while kill -0 $RC_PID ; do
+               print_rc_metadata "nop"
+               sleep 3
+           done
+       ) &
+
+       #
        # Get a list of all rc.d scripts, and use rcorder to choose
        # what order to execute them.
        #



Home | Main Index | Thread Index | Old Index