--no-fd-passing

This commit is contained in:
roberto@debian32
2011-05-26 05:29:01 +02:00
parent 431e05d4f4
commit 491f2828b5
5 changed files with 8 additions and 2 deletions
+1 -1
View File
@@ -437,7 +437,7 @@ void fastrouter_loop() {
iov[1].iov_len = fr_session->uh.pktsize;
// fd passing: PERFORMANCE EXTREME BOOST !!!
if (fr_session->pass_fd) {
if (fr_session->pass_fd && !uwsgi.no_fd_passing) {
msg.msg_name = NULL;
msg.msg_namelen = 0;
msg.msg_iov = iov;
+1 -1
View File
@@ -710,7 +710,7 @@ void http_loop() {
#ifndef __sun__
// fd passing: PERFORMANCE EXTREME BOOST !!!
if (uhttp_session->pass_fd && !uhttp_session->remains) {
if (uhttp_session->pass_fd && !uhttp_session->remains && !uwsgi.no_fd_passing) {
msg.msg_name = NULL;
msg.msg_namelen = 0;
msg.msg_iov = uhttp_session->iov;
+3
View File
@@ -84,6 +84,9 @@ int uwsgi_proto_uwsgi_parser(struct wsgi_request *wsgi_req) {
return UWSGI_OK;
#endif
if (uwsgi.no_fd_passing)
return UWSGI_OK;
cmsg = CMSG_FIRSTHDR(&wsgi_req->msg);
while (cmsg != NULL) {
if (cmsg->cmsg_len == CMSG_LEN(sizeof(int)) && cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type && SCM_RIGHTS) {
+1
View File
@@ -77,6 +77,7 @@ static struct option long_base_options[] = {
{"reaper", no_argument, 0, 'r'},
{"max-requests", required_argument, 0, 'R'},
{"socket-timeout", required_argument, 0, 'z'},
{"no-fd-passing", no_argument, &uwsgi.no_fd_passing, 1},
{"sharedarea", required_argument, 0, 'A'},
{"cache", required_argument, 0, LONG_ARGS_CACHE},
{"cache-blocksize", required_argument, 0, LONG_ARGS_CACHE_BLOCKSIZE},
+2
View File
@@ -843,6 +843,8 @@ struct uwsgi_server {
int master_as_root;
int die_on_term;
int no_fd_passing;
time_t current_time;
uint64_t master_cycles;