summaryrefslogtreecommitdiff
path: root/src/appMain/main.cc
diff options
context:
space:
mode:
authorAnton Hrytsevich <ahrytsevich>2016-01-19 17:40:13 +0200
committerAnton Hrytsevich <ahrytsevich>2016-02-01 12:30:05 +0200
commit76a15eb52415fdccb8b0c88807dcde2de3be314f (patch)
tree3066f2926bbc9c85c37368b6b41a48ce56b8408c /src/appMain/main.cc
parent80ce9bae55df6232cd78200a30dfa196b8681803 (diff)
downloadsdl_core-76a15eb52415fdccb8b0c88807dcde2de3be314f.tar.gz
Make refactoring signal catching
It keep simple and minimal code then previous version. Signal mask set once in main thread, than all creating thread copping this mask.
Diffstat (limited to 'src/appMain/main.cc')
-rw-r--r--src/appMain/main.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/appMain/main.cc b/src/appMain/main.cc
index 9e1a49e2d4..8ec46180a7 100644
--- a/src/appMain/main.cc
+++ b/src/appMain/main.cc
@@ -125,6 +125,12 @@ int32_t main(int32_t argc, char** argv) {
profile::Profile::instance()->config_file_name("smartDeviceLink.ini");
}
+ // Unsibscribe once for all threads
+ if ( utils::UnsibscribeFromTermination() ) {
+ // Can't use internal logger here
+ exit(EXIT_FAILURE);
+ }
+
// Logger initialization
INIT_LOGGER("log4cxx.properties");