mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-10-03 23:48:22 +00:00
--no-fd-passing
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user