btsync-gui: Process left running
Currently using Ubuntu 14.04, btsync-common 1.3.105-1 and btsync-gui 0.8.3-1.
After logging out a btsync-core process(/usr/lib/btsync-common/btsync-core --config /home/USER/.config/btsync/btsync-agent.conf) is left running. I assume this should be kill on logout.
I know about this behaviour. It affects not only btsync-gui but also btsync-user. The problem is, that we have to deal with two processes (in btsync-user it is the same):
btsync-gui is started as a regular process and in standalone mode, it starts the original BitTorrent Sync executable (called btsync-core) that demonises itself.
When btsync-gui is stop manually, it cares about stopping hist specific instance of btsync-core. Unfortunately on logout, it seems that all processes are killed in a very hard way and btsync-gui does not get any signal that it is about to be stopped. This hard kill on logout does not affect demonised processes, and that is the reason because btsync-core continues to run. If you login again and btsync-gui is restarted, it finds his associated still running btsync-core process.
Perhaps I'm doing something wrong: I tried both POSIX signal handling as DBUS signal handling (See https://github.com/tuxpoldo/btsync-deb/blob/master/btsync-gui/btsyncguiapp.py#L51) but nothing worked. Any idea?
p.S.: Since it does not really affect the functionality of the system, I would consider it a minor bug. As Product Manager of a commercial company I would define it as a feature ;-)
I would say minor as well, but having that process remain running locks the users home directory(can't umount), keeps them logged in, etc...
This is correct. And therefore I will fix it as soon as I understand how I can do it. Perhaps anybody here has any idea?
If I have any time, I'll try to dig in. btw, your work porting this and the gui, rocks! Thanks.
I asked the question in one public ask/answer site: http://superuser.com/questions/764043/how-to-let-linux-python-application-know-that-the-user-is-about-to-be-logged-out
Hope to get some suggestion.