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:
@@ -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 ""] {
|
||||
|
||||
Reference in New Issue
Block a user