Skip to content
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

btsync-gui: Process left running #132

Open
mcg opened this issue Jun 4, 2014 · 6 comments
Open

btsync-gui: Process left running #132

mcg opened this issue Jun 4, 2014 · 6 comments

Comments

@mcg
Copy link

mcg commented Jun 4, 2014

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.

@tuxpoldo tuxpoldo changed the title Process left running btsync-gui: Process left running Jun 5, 2014
@tuxpoldo tuxpoldo added the bug label Jun 5, 2014
@tuxpoldo
Copy link
Owner

tuxpoldo commented Jun 5, 2014

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?

@tuxpoldo
Copy link
Owner

tuxpoldo commented Jun 5, 2014

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 ;-)

@tuxpoldo tuxpoldo added btsync-gui and removed bug labels Jun 5, 2014
@mcg
Copy link
Author

mcg commented Jun 5, 2014

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...

@tuxpoldo
Copy link
Owner

tuxpoldo commented Jun 5, 2014

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?

@mcg
Copy link
Author

mcg commented Jun 5, 2014

If I have any time, I'll try to dig in. btw, your work porting this and the gui, rocks! Thanks.

@tuxpoldo
Copy link
Owner

tuxpoldo commented Jun 5, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants