mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-08 02:17:07 +08:00
Exit top on read failure
This commit is contained in:
@@ -89,7 +89,11 @@ top_main(int argc, char *argv[])
|
||||
|
||||
if (ret > 0) {
|
||||
|
||||
read(0, &c, 1);
|
||||
ret = read(0, &c, 1);
|
||||
|
||||
if (ret) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
switch (c) {
|
||||
case 0x03: // ctrl-c
|
||||
|
||||
Reference in New Issue
Block a user