Module Name: src Committed By: apb Date: Wed Apr 9 12:45:05 UTC 2014
Modified Files: src/etc: rc Log Message: Send a "nop" metadata message to the postprocessor every few seconds, to flush partial output lines. This should help with PR 48714. To generate a diff of this commit: cvs rdiff -u -r1.167 -r1.168 src/etc/rc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/etc/rc diff -u src/etc/rc:1.167 src/etc/rc:1.168 --- src/etc/rc:1.167 Wed Apr 9 12:38:09 2014 +++ src/etc/rc Wed Apr 9 12:45:05 2014 @@ -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 @@ rc_real_work() 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. #