From b1e27f43953d0578a246e3f5c19420ac663f0192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Thu, 9 Mar 2017 11:58:36 +0100 Subject: [PATCH] simulator: handle ctrl-c during startup correctly This makes sure the px4 process does not hang when Ctrl-C is pressed during startup. --- src/modules/simulator/simulator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/simulator/simulator.cpp b/src/modules/simulator/simulator.cpp index e4d5197b36..3bc26e8017 100644 --- a/src/modules/simulator/simulator.cpp +++ b/src/modules/simulator/simulator.cpp @@ -198,7 +198,7 @@ extern "C" { argv); // now wait for the command to complete - while (true) { + while (!px4_exit_requested()) { if (Simulator::getInstance() && Simulator::getInstance()->isInitialized()) { break;