New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PID file not removed #95
Comments
That seems logical to me. I don't think remote_syslog2 is currently using godaemon to handle any signals, but the capability seems to exist. |
I don't know what the best practice is, but I'm using the init script, maybe we could add |
I'm seeing the same behaviour here on a Linux box. We could add something into each init script, but that means it would still be broken for anyone that wants to roll their own. It seems like the binary should take care of this. If anyone digs up anything on the best way to do this in Golang, I'd love to take a look. If I get a chance, I'll see what I can find. |
Here are some examples I found: |
Thanks, @manuelmeurer, and that Docker implementation is particularly interesting. Looks like they're handling signals here, which relies on their signal lib and the removal function you linked to. The mirrorbits implementation was also quite a good read. Seems less sophisticated but might be enough for our needs. If/when I get a chance, I'll throw something together based on these examples. |
👍 |
Just tripped over this almost two months later. Awesome.
|
@QuinnyPig: totally agree and on our radar to change. If you happen to get to it first, pull requests are gratefully accepted (and this one would be reviewed and merged quickly). |
Just ran into this (@QuinnyPig fancy seeing you here :P). I'm happy to take a stab at fixing, the question is how to go about it. I'm pretty sure the root cause is in https://github.com/leonsodhi/lockfile/blob/master/lockfile.go#L56-L59. On line 46 in https://golang.org/src/os/exec_unix.go#L39, With that said, it's fairly straightforward to implement signal handling in the daemon & remove it ourselves. Any preference? |
@Bowbaq Small world! I've replaced the init script with something saner (but still an init script); it works really well. Should I submit a pull request, or is this something we're going to stuff into the daemon? Either way, this init script needs fixing. |
@QuinnyPig I'm definitely interested in a good init script, if you don't mind submitting a PR |
|
Shouldn't the PID file be removed when I run
kill -TERM
?The text was updated successfully, but these errors were encountered: