Stopping all application processes if router process dies.

Unit master process restarts the router if the router accidentally dies.
New router process receives the configuration from controller and starts
configured applications.  The information of running applications cannot
be transferred to router because currently there is no persistent application
identifier.  To avoid orphan application processes started by died router,
master process stops all currently running applications once it receives
SIGCHLD for router process.
This commit is contained in:
Max Romanov
2018-08-10 19:27:15 +03:00
parent 86740ab34b
commit ec1af82323
3 changed files with 29 additions and 3 deletions

View File

@@ -435,7 +435,7 @@ nxt_runtime_quit(nxt_task_t *task, nxt_uint_t status)
}
if (rt->type == NXT_PROCESS_MAIN) {
nxt_main_stop_worker_processes(task, rt);
nxt_main_stop_all_processes(task, rt);
done = 0;
}
}