Merge pull request #19336 from pdmorrow/reloading_restart

core,test: services in reloading state should exit without waiting TimeoutStartSec
This commit is contained in:
Lennart Poettering
2021-04-22 16:39:06 +02:00
committed by GitHub
5 changed files with 115 additions and 0 deletions
+9
View File
@@ -3474,6 +3474,15 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
case SERVICE_START_POST:
case SERVICE_RELOAD:
/* If neither main nor control processes are running then
* the current state can never exit cleanly, hence immediately
* terminate the service. */
if (control_pid_good(s) <= 0)
service_enter_stop(s, f);
/* Otherwise need to wait untill the operation is done. */
break;
case SERVICE_STOP:
/* Need to wait until the operation is
* done */