From d0ec331b6b1266deb6b423af318fd499699bbc52 Mon Sep 17 00:00:00 2001 From: "roberto@oneiric64" Date: Mon, 19 Dec 2011 07:52:42 +0100 Subject: [PATCH] do not daemonize in emperor mode --- uwsgi.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/uwsgi.c b/uwsgi.c index d7221ce9..044cf52b 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -3691,12 +3691,18 @@ static int manage_base_opt(int i, char *optarg) { #endif case 'd': - if (!uwsgi.is_a_reload) { - daemonize(optarg); - } - else if (uwsgi.log_reopen) { + // do not daemonize in emperor mode + if (uwsgi.has_emperor) { logto(optarg); } + else { + if (!uwsgi.is_a_reload) { + daemonize(optarg); + } + else if (uwsgi.log_reopen) { + logto(optarg); + } + } return 1; case 's': uwsgi_sock = uwsgi_new_socket(generate_socket_name(optarg));