FoldingAtHome / fah-issues

49 stars 9 forks source link

Optionally shutdown local FAHClient on exit #999

Open jcoffland opened 11 years ago

jcoffland commented 11 years ago
Trac Data
Ticket 999
Reported by @jcoffland
Status accepted
Component FAHControl
Priority 5
Milestone Upcoming Release

This would make it easier, with #997, to start and stop FAHClient with FAHControl. Users could then treat FAHClient and FAHControl as one app as was the case in some previous versions.

jcoffland commented 11 years ago

Comment by @kbernhagen Easy if client knows it will not be re-spawned, like the default Windows start at login install.

Not easy for typical service installs, which require admin authorization to stop.

On OSX, running as service, the client will not be able to stop the service. If it is given 'shutdown' command, it will simply be re-spawned by launchd. Stopping the service would need to be done by FAHControl via a privileged helper tool, which will need to be launched by functions in a dynamic C library loaded by FAHControl. It's possible to also add the code to the client to call the helper to unload the job. It would have to be pre-authorized for stop action so user is not asked for admin password.

The launchd plist could be changed to not always keep the client running, but then we would lose automatic restart if the client crashes. Would also lose easy client restart (ticket #998).

To keep it simple, maybe send client a 'request-shutdown' command, and let the client do its best. Or send 'shutdown', but then there should also be some sort of restart command so the client knows what is desired.

jcoffland commented 11 years ago

Comment by @kbernhagen Note also that if a remote client were actually stopped, there would be no way to start it again remotely.

jcoffland commented 11 years ago

Comment by @7im- The need to stop and restart FAHClient when forcing an update of the GPUs.txt file adds more weight to needing this functionality restored to FAHControl. Thanks.