Immediately exit if execlp()/dup2() failed

This commit is contained in:
blankie 2023-02-20 16:20:36 +07:00
parent 0e709f25cd
commit c3a277e232
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 2 additions and 2 deletions

View File

@ -289,7 +289,7 @@ bool LogcatThread::_handle_start_request() {
} catch (const std::exception& e) {
print_log({time(nullptr), e.what()});
}
exit(1);
_exit(1);
};
auto close_or_warn = [](int fd) {
if (!close(fd)) {
@ -329,7 +329,7 @@ bool LogcatThread::_handle_start_request() {
} catch (const std::exception& e) {
print_log({time(nullptr), e.what()});
}
exit(1);
_exit(1);
} else {
this->logcat_process_running.test_and_set();
return true;