From c85429ba8bb3df91c9c3a970a936c640146e3440 Mon Sep 17 00:00:00 2001 From: ahrenholz Date: Wed, 9 Oct 2013 19:57:45 +0000 Subject: [PATCH] (Boeing r1782) support tcl/tk8.6 when available fix channel read error upon shutdown with tcl8.6 --- gui/api.tcl | 6 +++++- gui/core-gui.in | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/api.tcl b/gui/api.tcl index e9918fc9..3c54bcea 100755 --- a/gui/api.tcl +++ b/gui/api.tcl @@ -75,7 +75,11 @@ proc receiveMessage { channel } { # read first four bytes of message header set more_data 1 while { $more_data == 1 } { - set bytes [read $channel 4] + if { [catch { set bytes [read $channel 4] } e] } { + # in tcl8.6 this occurs during shutdown + #puts "channel closed: $e" + break; + } if { [fblocked $channel] == 1} { # 4 bytes not available yet break; diff --git a/gui/core-gui.in b/gui/core-gui.in index 2aeed1b2..714994fe 100755 --- a/gui/core-gui.in +++ b/gui/core-gui.in @@ -92,7 +92,7 @@ cd $LIBDIR core=$LIBDIR/core.tcl # locate wish8.5 binaries -WISHLIST="/usr/local/bin/wish8.5 /usr/bin/wish8.5" +WISHLIST="/usr/bin/wish8.6 /usr/local/bin/wish8.5 /usr/bin/wish8.5" for wishbin in $WISHLIST do if [ -x $wishbin ]