From 0d731cd1fa222e61ff1b8c77f8bfc542cf5195d7 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Thu, 12 Sep 2019 11:50:06 +0200 Subject: [PATCH] Make sure the spawned subprocess goes away. --- build/build.tcl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/build.tcl b/build/build.tcl index 1c2ed545..3f04fcfd 100644 --- a/build/build.tcl +++ b/build/build.tcl @@ -21,12 +21,22 @@ if {![info exists env(MACSYMA)]} { set env(MACSYMA) "yes" } +proc cleanup {} { + global spawn_id + close -i $spawn_id + sleep 1 + exec kill [exp_pid $spawn_id] +} + proc abort {} { puts "" puts "The last command timed out." exit 1 } +exit -onexit cleanup +trap {exit 1} {SIGINT SIGTERM} + proc type s { sleep .1 foreach c [split $s ""] {