Skip to content
Snippets Groups Projects
Commit 4bf8c06d authored by Riccardo Binetti's avatar Riccardo Binetti Committed by Xiangrong Hao
Browse files

Use SIGKILL when killing inotifywait (#54)

parent 00f4bd4d
No related branches found
No related tags found
No related merge requests found
...@@ -106,7 +106,7 @@ defmodule FileSystem.Backends.FSInotify do ...@@ -106,7 +106,7 @@ defmodule FileSystem.Backends.FSInotify do
{worker_pid, rest} = Keyword.pop(args, :worker_pid) {worker_pid, rest} = Keyword.pop(args, :worker_pid)
case parse_options(rest) do case parse_options(rest) do
{:ok, port_args} -> {: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( port = Port.open(
{:spawn_executable, '/bin/sh'}, {:spawn_executable, '/bin/sh'},
[:stream, :exit_status, {:line, 16384}, {:args, bash_args ++ port_args}, {:cd, System.tmp_dir!()}] [:stream, :exit_status, {:line, 16384}, {:args, bash_args ++ port_args}, {:cd, System.tmp_dir!()}]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment