forked from openkylin/ukui-search
Merge pull request #104 from MouseZhangZh/0122-dev
🔒🔒🔒Changed _exit to exit.
This commit is contained in:
commit
6ce4490da4
|
@ -151,7 +151,7 @@ void FirstIndex::run(){
|
|||
mutex1.unlock();
|
||||
mutex2.unlock();
|
||||
mutex3.unlock();
|
||||
_exit(0);
|
||||
::exit(0);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -353,7 +353,7 @@ fork:
|
|||
}
|
||||
else if ( rc == 0 ) {
|
||||
qDebug() << "select timeout!";
|
||||
_exit(0);
|
||||
::exit(0);
|
||||
}else{
|
||||
numRead = read(m_fd, buf, BUF_LEN);
|
||||
if (numRead == -1){
|
||||
|
@ -375,7 +375,7 @@ fork:
|
|||
//MouseZhangZh
|
||||
|
||||
// connect(liveTime, &QTimer::timeout, [ = ](){
|
||||
//// _exit(0);
|
||||
//// ::exit(0);
|
||||
// *b_timeout = 1;
|
||||
// });
|
||||
// for (;;){
|
||||
|
@ -384,7 +384,7 @@ fork:
|
|||
// this->eventProcess(buf, numRead);
|
||||
// if (liveTime->remainingTime() < 1){
|
||||
// qDebug() << "liveTime->remainingTime():" << liveTime->remainingTime();
|
||||
// _exit(0);
|
||||
// ::exit(0);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
|
10
src/main.cpp
10
src/main.cpp
|
@ -36,15 +36,23 @@
|
|||
|
||||
void handler(int){
|
||||
qDebug() << "Recieved SIGTERM!";
|
||||
|
||||
|
||||
|
||||
GlobalSettings::getInstance()->setValue(INDEX_DATABASE_STATE, "2");
|
||||
GlobalSettings::getInstance()->setValue(CONTENT_INDEX_DATABASE_STATE, "2");
|
||||
GlobalSettings::getInstance()->setValue(INDEX_GENERATOR_NORMAL_EXIT, "2");
|
||||
GlobalSettings::getInstance()->setValue(INOTIFY_NORMAL_EXIT, "2");
|
||||
GlobalSettings::getInstance()->forceSync(INDEX_DATABASE_STATE);
|
||||
GlobalSettings::getInstance()->forceSync(CONTENT_INDEX_DATABASE_STATE);
|
||||
GlobalSettings::getInstance()->forceSync(INDEX_GENERATOR_NORMAL_EXIT);
|
||||
GlobalSettings::getInstance()->forceSync(INOTIFY_NORMAL_EXIT);
|
||||
|
||||
|
||||
qDebug() << "indexDataBaseStatus: " << GlobalSettings::getInstance()->getValue(INDEX_DATABASE_STATE).toString();
|
||||
qDebug() << "contentIndexDataBaseStatus: " << GlobalSettings::getInstance()->getValue(CONTENT_INDEX_DATABASE_STATE).toString();
|
||||
_exit(0);
|
||||
|
||||
::exit(0);
|
||||
|
||||
// InotifyIndex::getInstance("/home")->~InotifyIndex();
|
||||
|
||||
|
|
Loading…
Reference in New Issue