Merge pull request #135 from MouseZhangZh/0130-dev
Replacing exit(0) to _exit(0) to avoid crash down.
This commit is contained in:
commit
cc016618c0
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
|
Loading…
Reference in New Issue