kill signal for server process in `loop`
Thanks for this great program.
I have a feedback.yaml, and have defined a loop: https://github.com/peterbecich/halogen-chess/blob/8ec3f53991e529b44b5bfd78889e0fa91f4b6a93/feedback.yaml#L15
It runs a program halogen-chess which binds to port 8080.
The loop runs once successfully.
When the loop restarts, I see an error:
halogen-chess: Network.Socket.bind: resource busy (Address already in use)
The issue is solved by exiting feedback, which kills the halogen-chess process bound to port 8080.
Could feedback send a different kill signal to the process, when the loop is repeated, to solve this issue?
An alternative solution may be a before-all hook, such as:
hooks:
before-all:
kill -9 $(lsof -t -i:8080 -sTCP:LISTEN);
@peterbecich Feedback was never really intended for long-running processes in the loop, but now I see that that's actually a really cool use-case.
I think your before-all hook would not really solve the issue at hand.
Feedback "just" needs to wait for the process to exit correctly, but I'm surprised that it doesn't because I thought I had implemented that :(
Any digging would be welcome because I'm currently at an airport.
@peterbecich any news?
@NorfairKing , no, sorry, I've been unable to put any time into this issue
@peterbecich have you tried with latest master? It might be fixed now. I added some smartness about killing the loop process.