alco/porcelain

Goon driver doesn't send SIGKILL in Process.stop

ku1ik opened this issue · 0 comments

ku1ik commented

I installed goon to get SIGKILL support when calling Process.stop/1 but it actually doesn't work. See this iex session:

iex(1)> p = Porcelain.spawn("bash", ["-c", "trap '' SIGTERM; echo sleeping...; sleep 30; date >here.txt"])
%Porcelain.Process{err: nil, out: :string, pid: #PID<0.315.0>}
iex(2)> Porcelain.Process.await(p, 1000)
{:error, :timeout}
iex(3)> Porcelain.Process.stop(p)
true
iex(4)> File.read "here.txt"
{:error, :enoent}

30 seconds later:

iex(5)> File.read "here.txt"
{:ok, "Tue May 30 09:54:24 UTC 2017\n"}