Commit b1e121d2 authored by Locatelli's avatar Locatelli

add join to avoid error on destruction object on thread

parent 507409a4
......@@ -240,6 +240,7 @@ public:
}
subscriber->cancel();
nssimExit();
subscriberThread->join();
return EXIT_SUCCESS;
}
};
......
......@@ -358,6 +358,7 @@ public:
}
subscriber->cancel();
_quit = true;
subscriberThread->join();
return err;
}
};
......
......@@ -595,13 +595,14 @@ public:
application::This::setRunning();
_condition.wait(lock);
signal(SIGINT, SIG_DFL);
subscriber->cancel();
// td->interrupt();
// subscriberThread->interrupt();
clean_shutdown();
td->join();
subscriberThread->join();
return EXIT_SUCCESS;
}
};
......@@ -643,7 +644,11 @@ int32 main(int32 argc, char *argv[]) {
if (shell->_sim == false) {
signal(SIGINT, pauseCommand_handler);
}
err = shell->execute(argc, argv);
try {
err = shell->execute(argc, argv);
}
catch(...) {
}
delete shell;
}
application::This::terminate();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment