From 08d2a36f2fab2d218fcba2a4a59d32792009a6ee Mon Sep 17 00:00:00 2001 From: dfs Date: Mon, 2 Mar 1998 20:01:29 +0000 Subject: [PATCH] -- Made TkRemind properly handle problems with running Remind because of security features (even as Daemon) --- scripts/tkremind | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/tkremind b/scripts/tkremind index f1947f8c..849d9dee 100755 --- a/scripts/tkremind +++ b/scripts/tkremind @@ -11,7 +11,7 @@ # #-------------------------------------------------------------- -# $Id: tkremind,v 1.6 1998-03-02 19:55:41 dfs Exp $ +# $Id: tkremind,v 1.7 1998-03-02 20:01:29 dfs Exp $ # the next line restarts using wish \ exec wish "$0" "$@" @@ -310,6 +310,7 @@ proc FillCalWindow {} { set problem [catch { close $file } errmsg] if {$problem} { tk_dialog .error Error "There was a problem running Remind: $errmsg" error 0 OK + exit 1 } Status "Ready." } @@ -1454,7 +1455,11 @@ proc RestartBackgroundRemindDaemon {} { #--------------------------------------------------------------------------- proc DaemonReadable { file } { set line "" - catch { set line [gets $file] } + catch { set num [gets $file line] } + if {$num < 0} { + catch { close $file } + return + } switch -glob $line { "NOTE reminder*" { scan $line "NOTE reminder %s %s" time now