From 4bf8c06db108dfa826170ee2af5770d635c48f7b Mon Sep 17 00:00:00 2001 From: Riccardo Binetti <rbino@gmx.com> Date: Mon, 2 Jul 2018 15:23:10 +0200 Subject: [PATCH] Use SIGKILL when killing inotifywait (#54) --- lib/file_system/backends/fs_inotify.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/file_system/backends/fs_inotify.ex b/lib/file_system/backends/fs_inotify.ex index f18e6e2..f4f84e6 100644 --- a/lib/file_system/backends/fs_inotify.ex +++ b/lib/file_system/backends/fs_inotify.ex @@ -106,7 +106,7 @@ defmodule FileSystem.Backends.FSInotify do {worker_pid, rest} = Keyword.pop(args, :worker_pid) case parse_options(rest) do {:ok, port_args} -> - bash_args = ['-c', '#{executable_path()} $0 $@ & PID=$!; read a; kill $PID'] + bash_args = ['-c', '#{executable_path()} $0 $@ & PID=$!; read a; kill -KILL $PID'] port = Port.open( {:spawn_executable, '/bin/sh'}, [:stream, :exit_status, {:line, 16384}, {:args, bash_args ++ port_args}, {:cd, System.tmp_dir!()}] -- GitLab