--close-on-exec option

This commit is contained in:
roberto@sirius
2010-10-06 12:16:15 +02:00
parent ca43ad0a91
commit 723acced71
3 changed files with 7 additions and 0 deletions
+4
View File
@@ -436,6 +436,10 @@ int wsgi_req_accept(struct wsgi_request *wsgi_req) {
return -1;
}
if (uwsgi.close_on_exec) {
fcntl(wsgi_req->poll.fd, F_SETFD, FD_CLOEXEC);
}
return 0;
}
}
+1
View File
@@ -166,6 +166,7 @@ static struct option long_options[] = {
{"http-var", required_argument, 0, LONG_ARGS_HTTP_VAR},
#endif
{"catch-exceptions", no_argument, &uwsgi.catch_exceptions, 1},
{"close-on-exec", no_argument, &uwsgi.close_on_exec, 1},
{"mode", required_argument, 0, LONG_ARGS_MODE},
{"env", required_argument, 0, LONG_ARGS_ENV},
{"vacuum", no_argument, &uwsgi.vacuum, 1},
+2
View File
@@ -805,6 +805,8 @@ struct uwsgi_server {
#endif
struct wsgi_request* (*current_wsgi_req)(void);
int close_on_exec;
};
struct uwsgi_cluster_node {