If both -f and -t are given, flush the timing fd on each write, similar to the behavior on the script fd. This allows playback of still-running sessions, and reduces the risk of ending up with empty timing files when script(1) exits abnormally. Signed-off-by: Jesper Dahl Nyerup <nyerup@xxxxxxx> --- term-utils/script.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/term-utils/script.c b/term-utils/script.c index a4c2e0c..49f21b6 100644 --- a/term-utils/script.c +++ b/term-utils/script.c @@ -442,6 +442,8 @@ dooutput(FILE *timingfd) { } if (fflg) fflush(fscript); + if (tflg) + fflush(timingfd); if (write_all(STDOUT_FILENO, obuf, cc)) { warn (_("write failed")); fail(); -- 1.8.4 -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html