From 488f6bee0cda9ad50b3571dbb70089cabcb9af24 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 29 Sep 2024 18:00:46 +0200 Subject: 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. --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3