diff --git a/core/emperor.c b/core/emperor.c index 596ca8a5..2e4a2496 100644 --- a/core/emperor.c +++ b/core/emperor.c @@ -1039,7 +1039,7 @@ static void uwsgi_emperor_spawn_vassal(struct uwsgi_instance *n_ui) { char **vassal_argv = uwsgi_malloc(sizeof(char *) * counter); // set args - vassal_argv[0] = uwsgi.binary_path; + vassal_argv[0] = uwsgi.emperor_wrapper ? uwsgi.emperor_wrapper: uwsgi.binary_path; char *colon = NULL; diff --git a/core/uwsgi.c b/core/uwsgi.c index 60f7f9e7..acb8463c 100644 --- a/core/uwsgi.c +++ b/core/uwsgi.c @@ -173,6 +173,7 @@ static struct uwsgi_option uwsgi_base_options[] = { {"master", no_argument, 'M', "enable master process", uwsgi_opt_true, &uwsgi.master_process, 0}, {"honour-stdin", no_argument, 0, "do not remap stdin to /dev/null", uwsgi_opt_true, &uwsgi.honour_stdin, 0}, {"emperor", required_argument, 0, "run the Emperor", uwsgi_opt_add_string_list, &uwsgi.emperor, 0}, + {"emperor-wrapper", required_argument, 0, "set a binary wrapper for vassals", uwsgi_opt_set_str, &uwsgi.emperor_wrapper, 0}, {"emperor-nofollow", no_argument, 0, "do not follow symlinks when checking for mtime", uwsgi_opt_true, &uwsgi.emperor_nofollow, 0}, {"emperor-procname", required_argument, 0, "set the Emperor process name", uwsgi_opt_set_str, &uwsgi.emperor_procname, 0}, {"emperor-freq", required_argument, 0, "set the Emperor scan frequency (default 3 seconds)", uwsgi_opt_set_int, &uwsgi.emperor_freq, 0}, diff --git a/uwsgi.h b/uwsgi.h index f96dc20a..33012577 100644 --- a/uwsgi.h +++ b/uwsgi.h @@ -1870,6 +1870,7 @@ struct uwsgi_server { int emperor_clone; char *pivot_root; #endif + char *emperor_wrapper; #ifdef __FreeBSD__ char *jail;