shill: Disconnect services before exiting.
Add SIGINT/SIGTERM handler to gracefully exit the main loop and add
ability to disconnect from all services during the clean up.
BUG=chromium-os:19997
TEST=Unit tests, WiFiManager, manually run shill and Control-C
Change-Id: Ida02ade729af624ef0ea4e32e3fb80436aaf870b
Reviewed-on: https://gerrit.chromium.org/gerrit/11092
Commit-Ready: Thieu Le <thieule@chromium.org>
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Thieu Le <thieule@chromium.org>
diff --git a/shill_daemon.h b/shill_daemon.h
index 202f1c4..49f8937 100644
--- a/shill_daemon.h
+++ b/shill_daemon.h
@@ -25,11 +25,13 @@
void AddDeviceToBlackList(const std::string &device_name);
void Run();
+ void Quit();
private:
friend class ShillDaemonTest;
void Start();
+ void Stop();
Config *config_;
ControlInterface *control_;