mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 13:41:28 +00:00
smarter config management in the emperor
This commit is contained in:
@@ -432,6 +432,10 @@ void emperor_add(char *name, time_t born, char *config, uint32_t config_size, ui
|
||||
int i;
|
||||
struct timeval tv;
|
||||
|
||||
#ifdef UWSGI_DEBUG
|
||||
uwsgi_log("\n\nVASSAL %s %d %.*s %d %d\n", name, born, config_size, config, uid, gid);
|
||||
#endif
|
||||
|
||||
if (strlen(name) > (0xff - 1)) {
|
||||
uwsgi_log("[emperor] invalid vassal name\n", name);
|
||||
return;
|
||||
|
||||
@@ -38,7 +38,8 @@ void emperor_pg_do(char *name, char *config, time_t ts, uid_t uid, gid_t gid) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
emperor_add(name, ts, config, strlen(config), uid, gid);
|
||||
// make a copy of the config as it will be freed
|
||||
emperor_add(name, ts, uwsgi_str(config), strlen(config), uid, gid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user