Merge pull request #135 from MouseZhangZh/0130-dev

Replacing exit(0) to _exit(0) to avoid crash down.
This commit is contained in:
iaom 2021-02-06 15:16:43 +08:00 committed by GitHub
commit cc016618c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -111,7 +111,7 @@ void FirstIndex::run(){
prctl(PR_SET_NAME,"first-index");
if (this->bool_dataBaseExist){
if (this->bool_dataBaseStatusOK){
::exit(0);
::_exit(0);
}
else{
//if the parameter is false, index won't be rebuild
@ -169,7 +169,7 @@ void FirstIndex::run(){
if (p_indexGenerator)
delete p_indexGenerator;
p_indexGenerator = nullptr;
::exit(0);
::_exit(0);
}
else if(pid < 0)
{

View File

@ -419,7 +419,7 @@ fork:
qDebug() << "select timeout!";
::free(read_timeout);
IndexGenerator::getInstance()->~IndexGenerator();
::exit(0);
::_exit(0);
}else{
numRead = read(m_fd, buf, BUF_LEN);
if (numRead == -1){
@ -442,7 +442,7 @@ fork:
//MouseZhangZh
// connect(liveTime, &QTimer::timeout, [ = ](){
//// ::exit(0);
//// ::_exit(0);
// *b_timeout = 1;
// });
// for (;;){
@ -451,7 +451,7 @@ fork:
// this->eventProcess(buf, numRead);
// if (liveTime->remainingTime() < 1){
// qDebug() << "liveTime->remainingTime():" << liveTime->remainingTime();
// ::exit(0);
// ::_exit(0);
// }
// }