From 65c513bec2ff44446d2c68213d1bac62bbd65b1f Mon Sep 17 00:00:00 2001 From: Unbit Date: Mon, 28 Jan 2013 16:35:12 +0100 Subject: [PATCH] when the emperor has a master, allows it to respawn the dead emperor --- core/master.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/master.c b/core/master.c index de5c9582..a307767c 100644 --- a/core/master.c +++ b/core/master.c @@ -1271,6 +1271,12 @@ health_cycle: continue; #endif + if (uwsgi.emperor_pid >= 0) { + uwsgi_log_verbose("!!! Emperor died !!!\n"); + uwsgi_emperor_start(); + continue; + } + pid_found = 0; for (i = 0; i < uwsgi.mules_cnt; i++) { if (uwsgi.mules[i].pid == diedpid) {