mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 17:38:53 +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