aboutsummaryrefslogtreecommitdiff
path: root/test_reload.icl
diff options
context:
space:
mode:
Diffstat (limited to 'test_reload.icl')
-rw-r--r--test_reload.icl7
1 files changed, 4 insertions, 3 deletions
diff --git a/test_reload.icl b/test_reload.icl
index 052c4c9..6b71c8f 100644
--- a/test_reload.icl
+++ b/test_reload.icl
@@ -22,6 +22,7 @@ import Inotify
*
* Test it by running `make run_test_reload`, then editing `changeme` below and
* running `make test_reload` to recompile.
+ * You can also use `touch test_reload`.
*/
my_name :== "test_reload"
@@ -33,10 +34,10 @@ verbose :== False
Start w
# (io,w) = stdio w
-# io = io <<< changeme <<< "\n"
+# io = io <<< changeme <<< " (edit changeme and recompile)\n"
# (ok,w) = fclose io w
# (Just inot) = inotify_init Void
-# (Right watch,inot) = inotify_add_watch reload IN_ALL_EVENTS my_dir inot
+# (Right watch,inot) = inotify_add_watch reload IN_ATTRIB my_dir inot
# (inot,w) = inotify_loop_forever inot w
= inotify_close inot
where
@@ -45,7 +46,7 @@ where
# w = echo (\f -> f <<< "event: " <<< ev <<< "; " <<< mbName) w
| isNothing mbName = (Void, w)
# (Just name) = mbName
- | ev bitand IN_ATTRIB <> 0 && name == my_name
+ | inotify_is_event IN_ATTRIB ev && name == my_name
# w = echo (\f -> f <<< "reloading...") w
# w = exit 127 w
= (Void, w)