1
0
mirror of https://github.com/PDP-10/its.git synced 2026-03-04 10:44:38 +00:00

Make sure the spawned subprocess goes away.

This commit is contained in:
Lars Brinkhoff
2019-09-12 11:50:06 +02:00
parent 064c4db58b
commit 0d731cd1fa

View File

@@ -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 ""] {