aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-09-29 18:00:46 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-09-29 18:00:46 +0200
commit488f6bee0cda9ad50b3571dbb70089cabcb9af24 (patch)
treeee16bbbfb78edc7c4ed2ea39d7413cf17796200e
parent61f79bb3046e4b548f2a1798abccb7b53e284516 (diff)
downloadvis-inotify-488f6bee0cda9ad50b3571dbb70089cabcb9af24.tar.gz
vis-inotify-488f6bee0cda9ad50b3571dbb70089cabcb9af24.zip
make inotifywait a direct child of vis
vis:communicate passes the command to the shell, therefore two processes are created the shell process and the actual command we want to run. If we only terminate the shell process the inotifywait command is simply handed to init and not terminated. This is addressed by replacing the shell process with inotifywait by using exec.
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 9cd5366..09d2beb 100644
--- a/init.lua
+++ b/init.lua
@@ -26,7 +26,7 @@ end
-- vis will terminate them.
local watches = {} -- luacheck: ignore watches
local function _add_watch(file, func, mode, cmd_options)
- local cmd = 'inotifywait '
+ local cmd = 'exec inotifywait '
if cmd_options then cmd = cmd .. ' ' .. cmd_options .. ' ' end
if mode == 'monitor' then cmd = cmd .. '-m ' end