mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 05:31:44 +00:00
re-added --ignore-sigpipe
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user