Immediately exit if execlp()/dup2() failed
This commit is contained in:
parent
0e709f25cd
commit
c3a277e232
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue