diff --git a/build/build.tcl b/build/build.tcl index f4433f40..ba0a640e 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -106,7 +106,11 @@ proc build_macsyma_portion {} { } set timeout 100 -expect_after timeout abort +proc setup_timeout {} { + # Don't do this until after you've called "spawn", otherwise it'll cause a + # read from stdin which will return EOF if stdin isn't a tty. + expect_after timeout abort +} set ip [ip_address [lindex $argv 0]] set gw [ip_address [lindex $argv 1]] diff --git a/build/simh/build.tcl b/build/simh/build.tcl index 43df068e..35119f7d 100644 --- a/build/simh/build.tcl +++ b/build/simh/build.tcl @@ -4,6 +4,8 @@ set emulator_escape "\034" proc start_salv {} { uplevel #0 {spawn pdp10 build/simh/init} + setup_timeout + respond "sim>" "show ver\r" respond "sim>" "b tu1\r" expect "MTBOOT" @@ -23,6 +25,7 @@ proc start_dskdmp {} { proc start_its {} { uplevel #0 {spawn pdp10 build/simh/boot} + setup_timeout } proc mount_tape {file} {