Lord Spectre
Member
I just updated from SinusBot 0.9.8 to 0.9.12.3-36fce3c, on a VPS running Ubuntu Server 14.04 LTS x64.
I noticed that, unlike the old version, when I start it two "sinusbot" processes get executed.
I am using Supervisor to manage the process, and when I request to terminate it, it sends a SIGTERM to the first process, the one it started: the other one is still running and the bot still works fine. You can test this by manually killing the first process.
There are two solutions that will allow Supervisor (and similar process managers) to work fine: either you can handle the SIGTERM on the first process killing the second one too, or you can write the PID of the second process to a file, so it can be killed afterwards (I tested that manually killing the second process works fine, the first one stops too).
You can read about how Supervisor handles subprocesses here, but I'm sure other process managers and init-files would benefit from this.
Is it possible to implement any of these solutions, or as a workaround add a config option to disable the forking?
I noticed that, unlike the old version, when I start it two "sinusbot" processes get executed.
I am using Supervisor to manage the process, and when I request to terminate it, it sends a SIGTERM to the first process, the one it started: the other one is still running and the bot still works fine. You can test this by manually killing the first process.
There are two solutions that will allow Supervisor (and similar process managers) to work fine: either you can handle the SIGTERM on the first process killing the second one too, or you can write the PID of the second process to a file, so it can be killed afterwards (I tested that manually killing the second process works fine, the first one stops too).
You can read about how Supervisor handles subprocesses here, but I'm sure other process managers and init-files would benefit from this.
Is it possible to implement any of these solutions, or as a workaround add a config option to disable the forking?