re-added --ignore-sigpipe

This commit is contained in:
roberto@precise64
2012-03-10 12:34:45 +01:00
parent d7e8523fcf
commit 02e4840b29
3 changed files with 16 additions and 4 deletions
+9 -3
View File
@@ -404,8 +404,6 @@ struct fastrouter_session *alloc_fr_session() {
return uwsgi_calloc(sizeof(struct fastrouter_session));
}
void fastrouter_thread_loop(void *);
void fastrouter_loop(int id) {
int i;
@@ -432,7 +430,15 @@ void fastrouter_loop(int id) {
if (!ufr.static_node_gracetime)
ufr.static_node_gracetime = 30;
if (ufr.stats_server) {
int i_am_the_first = 1;
for(i=0;i<id;i++) {
if (!strcmp(ushared->gateways[i].name, "uWSGI fastrouter")) {
i_am_the_first = 0;
break;
}
}
if (ufr.stats_server && i_am_the_first) {
char *tcp_port = strchr(ufr.stats_server, ':');
if (tcp_port) {
// disable deferred accept for this socket
+5 -1
View File
@@ -82,6 +82,8 @@ static struct uwsgi_option uwsgi_base_options[] = {
{"endif", optional_argument, 0, "(opt logic) end if", uwsgi_opt_noop, NULL, UWSGI_OPT_IMMEDIATE},
{"ignore-sigpipe", no_argument, 0, "do not report (annoying) SIGPIPE", uwsgi_opt_true, &uwsgi.ignore_sigpipe,0},
{"inherit", required_argument, 0, "use the specified file as config template", uwsgi_opt_load, NULL,0},
{"daemonize", required_argument, 'd', "daemonize uWSGI", uwsgi_opt_set_str, &uwsgi.daemonize, 0},
{"daemonize2", required_argument, 0, "daemonize uWSGI after app loading", uwsgi_opt_set_str, &uwsgi.daemonize2, 0},
@@ -3001,7 +3003,9 @@ skipzero:
uwsgi_unix_signal(SIGUSR1, stats);
signal(SIGUSR2, (void *) &what_i_am_doing);
signal(SIGPIPE, (void *) &warn_pipe);
if (!uwsgi.ignore_sigpipe) {
signal(SIGPIPE, (void *) &warn_pipe);
}
//initialization done
+2
View File
@@ -1179,6 +1179,8 @@ struct uwsgi_server {
int unshare;
#endif
int ignore_sigpipe;
// still working on it
char *profiler;