This commit is contained in:
Thulinma 2024-05-31 15:31:09 +02:00
parent fe6ff1dce0
commit fef893f60a

View file

@ -659,11 +659,11 @@ int main(int argc, char **argv){
continue; continue;
} }
// if the exit was clean, don't restart it // if the exit was clean, don't restart it
if (WIFEXITED(status) && (WEXITSTATUS(status) == 0 && !Util::Config::is_restarting)){ if (WIFEXITED(status) && (WEXITSTATUS(status) == 0) && !Util::Config::is_restarting){
MEDIUM_MSG("Controller shut down cleanly"); MEDIUM_MSG("Controller shut down cleanly");
break; break;
} }
if (WIFEXITED(status) && (WEXITSTATUS(status) == 42 || Util::Config::is_restarting)){ if ((WIFEXITED(status) && WEXITSTATUS(status) == 42) || Util::Config::is_restarting){
WARN_MSG("Refreshing angel process for update"); WARN_MSG("Refreshing angel process for update");
std::string myFile = Util::getMyPath() + "MistController"; std::string myFile = Util::getMyPath() + "MistController";
execvp(myFile.c_str(), argv); execvp(myFile.c_str(), argv);