mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Posix: add '#pragma GCC poison exit'
Generally exit() should not be used on Posix, because it exits the whole program instead of only the task.
This commit is contained in:
@@ -330,7 +330,7 @@ Client::_sig_handler(int sig_num)
|
||||
|
||||
if (_client_send_pipe_fd < 0) {
|
||||
PX4_ERR("pipe open fail");
|
||||
exit(-1);
|
||||
system_exit(-1);
|
||||
}
|
||||
|
||||
int bytes_to_send = get_client_send_packet_length(&packet);
|
||||
@@ -338,7 +338,7 @@ Client::_sig_handler(int sig_num)
|
||||
|
||||
if (bytes_sent != bytes_to_send) {
|
||||
PX4_ERR("write fail");
|
||||
exit(-1);
|
||||
system_exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ void
|
||||
px4_systemreset(bool to_bootloader)
|
||||
{
|
||||
PX4_WARN("Called px4_system_reset");
|
||||
exit(0);
|
||||
system_exit(0);
|
||||
}
|
||||
|
||||
px4_task_t px4_task_spawn_cmd(const char *name, int scheduler, int priority, int stack_size, px4_main_t entry,
|
||||
|
||||
Reference in New Issue
Block a user