mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-03 20:21:41 +00:00
allow --namespace-net and fix python library name
This commit is contained in:
@@ -20,10 +20,8 @@ else:
|
||||
os.environ['LD_RUN_PATH'] = "%s/lib" % sysconfig.PREFIX
|
||||
|
||||
|
||||
version = sys.version_info
|
||||
uver = "%d.%d" % (version[0], version[1])
|
||||
|
||||
LIBS.append('-lpython' + uver)
|
||||
version = sysconfig.get_config_var('VERSION')
|
||||
LIBS.append('-lpython' + version)
|
||||
|
||||
#if str(PYLIB_PATH) != '':
|
||||
# libs.insert(0,'-L' + PYLIB_PATH)
|
||||
|
||||
@@ -956,7 +956,9 @@ options_parsed:
|
||||
int waitpid_status;
|
||||
uwsgi_log("*** jailing uWSGI in %s ***\n", uwsgi.ns);
|
||||
int clone_flags = SIGCHLD|CLONE_NEWUTS|CLONE_NEWPID|CLONE_NEWIPC|CLONE_NEWNS;
|
||||
//clone_flags |= CLONE_NEWNET;
|
||||
if (uwsgi.ns_net) {
|
||||
clone_flags |= CLONE_NEWNET;
|
||||
}
|
||||
pid_t pid = clone(uwsgi_start, stack+PTHREAD_STACK_MIN, clone_flags, (void *)argv);
|
||||
if (pid == -1) {
|
||||
uwsgi_error("clone()");
|
||||
@@ -2409,6 +2411,9 @@ end:
|
||||
case LONG_ARGS_LINUX_NS:
|
||||
uwsgi.ns = optarg;
|
||||
return 1;
|
||||
case LONG_ARGS_LINUX_NS_NET:
|
||||
uwsgi.ns_net = optarg;
|
||||
return 1;
|
||||
#endif
|
||||
case LONG_ARGS_LIMIT_AS:
|
||||
uwsgi.rl.rlim_cur = (atoi(optarg)) * 1024 * 1024;
|
||||
|
||||
Reference in New Issue
Block a user