mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-20 16:22:59 +02:00
-- Made TkRemind properly handle problems with running Remind because
of security features (even as Daemon)
This commit is contained in:
+7
-2
@@ -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 \
|
# the next line restarts using wish \
|
||||||
exec wish "$0" "$@"
|
exec wish "$0" "$@"
|
||||||
@@ -310,6 +310,7 @@ proc FillCalWindow {} {
|
|||||||
set problem [catch { close $file } errmsg]
|
set problem [catch { close $file } errmsg]
|
||||||
if {$problem} {
|
if {$problem} {
|
||||||
tk_dialog .error Error "There was a problem running Remind: $errmsg" error 0 OK
|
tk_dialog .error Error "There was a problem running Remind: $errmsg" error 0 OK
|
||||||
|
exit 1
|
||||||
}
|
}
|
||||||
Status "Ready."
|
Status "Ready."
|
||||||
}
|
}
|
||||||
@@ -1454,7 +1455,11 @@ proc RestartBackgroundRemindDaemon {} {
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
proc DaemonReadable { file } {
|
proc DaemonReadable { file } {
|
||||||
set line ""
|
set line ""
|
||||||
catch { set line [gets $file] }
|
catch { set num [gets $file line] }
|
||||||
|
if {$num < 0} {
|
||||||
|
catch { close $file }
|
||||||
|
return
|
||||||
|
}
|
||||||
switch -glob $line {
|
switch -glob $line {
|
||||||
"NOTE reminder*" {
|
"NOTE reminder*" {
|
||||||
scan $line "NOTE reminder %s %s" time now
|
scan $line "NOTE reminder %s %s" time now
|
||||||
|
|||||||
Reference in New Issue
Block a user