mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-04 20:51:29 +00:00
added -S/--set option
This commit is contained in:
@@ -38,7 +38,8 @@ PyObject *py_uwsgi_spit(PyObject * self, PyObject * args) {
|
||||
// in this way, error will be reported to the log
|
||||
PyErr_Restore(exc_type, exc_val, exc_tb);
|
||||
|
||||
goto clear;
|
||||
// the error is reported, let's continue...
|
||||
//goto clear;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ static struct option long_base_options[] = {
|
||||
{"xmlconfig", required_argument, 0, 'x'},
|
||||
{"xml", required_argument, 0, 'x'},
|
||||
#endif
|
||||
{"set", required_argument, 0, 'S'},
|
||||
{"inherit", required_argument, 0, LONG_ARGS_INHERIT},
|
||||
{"daemonize", required_argument, 0, 'd'},
|
||||
{"listen", required_argument, 0, 'l'},
|
||||
@@ -2821,6 +2822,16 @@ static int manage_base_opt(int i, char *optarg) {
|
||||
case LONG_ARGS_PROFILER:
|
||||
uwsgi.profiler = optarg;
|
||||
return 1;
|
||||
case 'S':
|
||||
p = strchr(optarg, '=');
|
||||
if (!p) {
|
||||
uwsgi_log("invalid --set value\n");
|
||||
exit(1);
|
||||
}
|
||||
p[0] = 0;
|
||||
add_exported_option(uwsgi_str(optarg), p+1, 1);
|
||||
p[0] = '=';
|
||||
return 1;
|
||||
case LONG_ARGS_INHERIT:
|
||||
uct = uwsgi.config_templates;
|
||||
if (!uct) {
|
||||
|
||||
@@ -13,6 +13,7 @@ extern "C" {
|
||||
#define uwsgi_error_open(x) uwsgi_log("open(\"%s\"): %s [%s line %d]\n", x, strerror(errno), __FILE__, __LINE__);
|
||||
#define uwsgi_debug(x, ...) uwsgi_log("[uWSGI DEBUG] " x, __VA_ARGS__);
|
||||
#define uwsgi_rawlog(x) if (write(2, x, strlen(x)) != strlen(x)) uwsgi_error("write()")
|
||||
#define uwsgi_str(x) uwsgi_concat2(x, "")
|
||||
|
||||
#define uwsgi_notify(x) if (uwsgi.notify) uwsgi.notify(x)
|
||||
#define uwsgi_notify_ready() if (uwsgi.notify_ready) uwsgi.notify_ready()
|
||||
|
||||
Reference in New Issue
Block a user