bitwalker / exrm

Automatically generate a release for your Elixir project!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"/rel/<projectname>/bin/<projectname> stop" does not work

farao opened this issue · comments

Hi, I can't stop my via "/rel/projectname/bin/projectname start" started application. The output says "ok" but the script doesn't stop. I have to break it up via CTRL-c and afterwards the process is still running.

How to reproduce:
git clone git@github.com:farao/signaltower.git
cd signaltower; mix release
/rel/signal_tower/bin/signal_tower start
/rel/signal_tower/bin/signal_tower stop

Why doesn't stopping work here? Am I making an error?

Ah, I just realised that it's the "while $(kill -0 "$PID" 2>/dev/null);" in the stop) section of rel/signal_tower/releases/1.0.0/signal_tower.sh that never stops looping. Why kill -0? shouldn't this be kill -9 (SIGKILL) or kill -15 (SIGTERM)?

@farao kill -0 just checks to see if the given pid is running and if you have access to send signals to it, so it loops until the pid stops.

Have you looked at distillery yet? I'm more or less deprecating exrm and moving active development to distillery. I'll take a look and see if I can reproduce this and what might be causing it to not stop.

Closed due to the result found in bitwalker/distillery#46