allow --namespace-net and fix python library name

This commit is contained in:
roberto@natty32
2011-03-26 09:18:52 +01:00
parent 5c64c1ac3f
commit e87e54ea28
3 changed files with 9 additions and 5 deletions
+2 -4
View File
@@ -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)
+6 -1
View File
@@ -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;
+1
View File
@@ -962,6 +962,7 @@ struct uwsgi_server {
char *cgroup_opt[64];
int cgroup_opt_cnt;
char *ns;
char *ns_net;
#endif
int sockets_cnt;