From b0eed4699a238e3d2c9eb26cc2ccf4d73a080df7 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Fri, 1 Nov 2019 10:21:09 +0100 Subject: [PATCH] Avoid race condition after :TCTYP LA36. --- build/emacs.tcl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/build/emacs.tcl b/build/emacs.tcl index b9d11026..92b1da24 100644 --- a/build/emacs.tcl +++ b/build/emacs.tcl @@ -106,7 +106,13 @@ respond "*" "info\033\023" respond "*" ":emacs\r" expect "INFO Dumped" expect ":KILL" -respond "*" ":tctyp la36\r" +respond "*" ":tctyp la36" +# Race condition here. Since the terminal type is set to AAA, the CR +# character is stored as %TDCRL in the output buffer. But if TCTYP +# changes the terminal type to LA36 before the %TDCRL is processed, +# the code outputs nothing since that is the behavior on a printing +# terminal. +send "\r" expect ":KILL" # The previous file version was 62, dated 1982-01-05. respond "*" ":rename emacs; tsinfo >, tsinfo 63\r" @@ -134,7 +140,9 @@ respond "*" ":cwd kmp\r" respond "*" "kmp\033\023" respond "*" ":dumpt \033turnip;view\r" expect "Dumped to" -respond "*" ":tctyp la36\r" +respond "*" ":tctyp la36" +# Race condition. See previous :tctyp la36. +send "\r" respond "*" ":move turnip; ts view, sys3;\r" # VDIR