Fix controller not always updating after receiving a USR1 signal
This commit is contained in:
		
							parent
							
								
									a5d092c768
								
							
						
					
					
						commit
						11f19c77eb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -651,7 +651,6 @@ int main(int argc, char **argv){
 | 
				
			||||||
    while (waitpid(pid, &status, 0) != pid && errno == EINTR){
 | 
					    while (waitpid(pid, &status, 0) != pid && errno == EINTR){
 | 
				
			||||||
      if (Util::Config::is_restarting){
 | 
					      if (Util::Config::is_restarting){
 | 
				
			||||||
        Controller::conf.is_active = true;
 | 
					        Controller::conf.is_active = true;
 | 
				
			||||||
        Util::Config::is_restarting = false;
 | 
					 | 
				
			||||||
        kill(pid, SIGUSR1);
 | 
					        kill(pid, SIGUSR1);
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (!Controller::conf.is_active){
 | 
					      if (!Controller::conf.is_active){
 | 
				
			||||||
| 
						 | 
					@ -671,6 +670,7 @@ int main(int argc, char **argv){
 | 
				
			||||||
      execvp(myFile.c_str(), argv);
 | 
					      execvp(myFile.c_str(), argv);
 | 
				
			||||||
      FAIL_MSG("Error restarting: %s", strerror(errno));
 | 
					      FAIL_MSG("Error restarting: %s", strerror(errno));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    Util::Config::is_restarting = false;
 | 
				
			||||||
    INFO_MSG("Controller uncleanly shut down! Restarting in %" PRIu64 "...", reTimer);
 | 
					    INFO_MSG("Controller uncleanly shut down! Restarting in %" PRIu64 "...", reTimer);
 | 
				
			||||||
    Util::wait(reTimer);
 | 
					    Util::wait(reTimer);
 | 
				
			||||||
    reTimer += 1000;
 | 
					    reTimer += 1000;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue