From 6cebf19468d094c01935f80f5197878b8aa5b72e Mon Sep 17 00:00:00 2001 From: "roberto@fiorenzo" Date: Mon, 27 Sep 2010 17:05:58 +0200 Subject: [PATCH] fix --wsgi-file and --pythonpath cooperation --- master.c | 14 ++++++++++++++ utils.c | 4 ++++ uwsgi.c | 13 ------------- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/master.c b/master.c index aa9e428e..5ef861dc 100644 --- a/master.c +++ b/master.c @@ -1,5 +1,19 @@ #include "uwsgi.h" +#ifdef __linux__ +void get_linux_tcp_info(int fd) { + struct tcp_info ti; + socklen_t tis = sizeof(struct tcp_info) ; + + if (!getsockopt(fd, IPPROTO_TCP, TCP_INFO, &ti, &tis)) { + if (ti.tcpi_unacked >= ti.tcpi_sacked) { + uwsgi_log_verbose("*** uWSGI listen queue of socket %d full !!! (%d/%d) ***\n", fd, ti.tcpi_unacked, ti.tcpi_sacked); + } + } +} +#endif + + void master_loop(struct uwsgi_server *uwsgi, char **argv, char **environ) { uint64_t master_cycles = 0; diff --git a/utils.c b/utils.c index b0088473..e190fae9 100644 --- a/utils.c +++ b/utils.c @@ -475,6 +475,10 @@ void sanitize_args(struct uwsgi_server *uwsgi) { uwsgi->single_interpreter = 1 ; } + if (uwsgi->wsgi_file) { + uwsgi->single_interpreter = 1 ; + } + #ifdef UWSGI_INI if (uwsgi->ini) { uwsgi->single_interpreter = 1 ; diff --git a/uwsgi.c b/uwsgi.c index 46296871..d6bb9477 100644 --- a/uwsgi.c +++ b/uwsgi.c @@ -177,19 +177,6 @@ static struct option long_options[] = { {0, 0, 0, 0} }; -#ifdef __linux__ -void get_linux_tcp_info(int fd) { - struct tcp_info ti; - socklen_t tis = sizeof(struct tcp_info) ; - - if (!getsockopt(fd, IPPROTO_TCP, TCP_INFO, &ti, &tis)) { - if (ti.tcpi_unacked >= ti.tcpi_sacked) { - uwsgi_log_verbose("*** uWSGI listen queue of socket %d full !!! (%d/%d) ***\n", fd, ti.tcpi_unacked, ti.tcpi_sacked); - } - } -} -#endif - void ping(struct uwsgi_server *uwsgi) { struct uwsgi_header uh;