Replacing exit(0) to _exit(0) to avoid crash down.
This commit is contained in:
parent
cc7147698f
commit
dc851cf32f
|
@ -111,7 +111,7 @@ void FirstIndex::run(){
|
||||||
prctl(PR_SET_NAME,"first-index");
|
prctl(PR_SET_NAME,"first-index");
|
||||||
if (this->bool_dataBaseExist){
|
if (this->bool_dataBaseExist){
|
||||||
if (this->bool_dataBaseStatusOK){
|
if (this->bool_dataBaseStatusOK){
|
||||||
::exit(0);
|
::_exit(0);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//if the parameter is false, index won't be rebuild
|
//if the parameter is false, index won't be rebuild
|
||||||
|
@ -169,7 +169,7 @@ void FirstIndex::run(){
|
||||||
if (p_indexGenerator)
|
if (p_indexGenerator)
|
||||||
delete p_indexGenerator;
|
delete p_indexGenerator;
|
||||||
p_indexGenerator = nullptr;
|
p_indexGenerator = nullptr;
|
||||||
::exit(0);
|
::_exit(0);
|
||||||
}
|
}
|
||||||
else if(pid < 0)
|
else if(pid < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -419,7 +419,7 @@ fork:
|
||||||
qDebug() << "select timeout!";
|
qDebug() << "select timeout!";
|
||||||
::free(read_timeout);
|
::free(read_timeout);
|
||||||
IndexGenerator::getInstance()->~IndexGenerator();
|
IndexGenerator::getInstance()->~IndexGenerator();
|
||||||
::exit(0);
|
::_exit(0);
|
||||||
}else{
|
}else{
|
||||||
numRead = read(m_fd, buf, BUF_LEN);
|
numRead = read(m_fd, buf, BUF_LEN);
|
||||||
if (numRead == -1){
|
if (numRead == -1){
|
||||||
|
@ -442,7 +442,7 @@ fork:
|
||||||
//MouseZhangZh
|
//MouseZhangZh
|
||||||
|
|
||||||
// connect(liveTime, &QTimer::timeout, [ = ](){
|
// connect(liveTime, &QTimer::timeout, [ = ](){
|
||||||
//// ::exit(0);
|
//// ::_exit(0);
|
||||||
// *b_timeout = 1;
|
// *b_timeout = 1;
|
||||||
// });
|
// });
|
||||||
// for (;;){
|
// for (;;){
|
||||||
|
@ -451,7 +451,7 @@ fork:
|
||||||
// this->eventProcess(buf, numRead);
|
// this->eventProcess(buf, numRead);
|
||||||
// if (liveTime->remainingTime() < 1){
|
// if (liveTime->remainingTime() < 1){
|
||||||
// qDebug() << "liveTime->remainingTime():" << liveTime->remainingTime();
|
// qDebug() << "liveTime->remainingTime():" << liveTime->remainingTime();
|
||||||
// ::exit(0);
|
// ::_exit(0);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue