mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
simulator: handle ctrl-c during startup correctly
This makes sure the px4 process does not hang when Ctrl-C is pressed during startup.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user