Use "-q" option with inotifywait

This commit is contained in:
Dianne Skoll
2020-12-30 11:01:25 -05:00
parent 3592b43629
commit 9e2a9fea37

View File

@@ -3557,11 +3557,10 @@ proc SetFonts {} {
}
# Set up inotify to watch for changes to reminder file/directory
proc SetupInotify {} {
global InotifyFP
global ReminderFile
set failed [catch {set InotifyFP [open "|inotifywait -m -e close_write -e move -e create -e delete $ReminderFile" "r"] } ]
set failed [catch {set InotifyFP [open "|inotifywait -q -m -e close_write -e move -e create -e delete $ReminderFile" "r"] } ]
if {$failed} {
# inotifywait probably not available... meh.
return
@@ -3569,6 +3568,8 @@ proc SetupInotify {} {
fileevent $InotifyFP readable [list InotifyReadable $InotifyFP]
}
# Called when inotifywait reports an event. Schedule a calendar update
# and daemon reload.
proc InotifyReadable { fp } {
catch { set num [gets $fp line] }
if {$num < 0} {