diff --git a/platforms/posix/src/px4/common/main.cpp b/platforms/posix/src/px4/common/main.cpp index 89841e4fac..7ed6a1a883 100644 --- a/platforms/posix/src/px4/common/main.cpp +++ b/platforms/posix/src/px4/common/main.cpp @@ -425,7 +425,7 @@ void register_sig_handler() sigaction(SIGINT, &sig_int, nullptr); #endif - //sigaction(SIGTERM, &sig_int, nullptr); + sigaction(SIGTERM, &sig_int, nullptr); sigaction(SIGFPE, &sig_fpe, nullptr); sigaction(SIGPIPE, &sig_pipe, nullptr); } @@ -433,7 +433,7 @@ void register_sig_handler() void sig_int_handler(int sig_num) { fflush(stdout); - printf("\nExiting...\n"); + printf("\nPX4 Exiting...\n"); fflush(stdout); px4_daemon::Pxh::stop(); _exit_requested = true; @@ -552,7 +552,8 @@ int run_startup_script(const std::string &commands_file, const std::string &abso void wait_to_exit() { while (!_exit_requested) { - px4_usleep(100000); + // needs to be a regular sleep not dependant on lockstep (not px4_usleep) + usleep(100000); } }