diff options
Diffstat (limited to 'networking/httpd.c')
-rw-r--r-- | networking/httpd.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index e9137287c..7b7446ed9 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1788,7 +1788,6 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) | |||
1788 | char *header_ptr = header_ptr; | 1788 | char *header_ptr = header_ptr; |
1789 | Htaccess_Proxy *proxy_entry; | 1789 | Htaccess_Proxy *proxy_entry; |
1790 | #endif | 1790 | #endif |
1791 | struct sigaction sa; | ||
1792 | #if ENABLE_FEATURE_HTTPD_BASIC_AUTH | 1791 | #if ENABLE_FEATURE_HTTPD_BASIC_AUTH |
1793 | int credentials = -1; /* if not required this is Ok */ | 1792 | int credentials = -1; /* if not required this is Ok */ |
1794 | #endif | 1793 | #endif |
@@ -1819,11 +1818,7 @@ static void handle_incoming_and_exit(const len_and_sockaddr *fromAddr) | |||
1819 | } | 1818 | } |
1820 | 1819 | ||
1821 | /* Install timeout handler */ | 1820 | /* Install timeout handler */ |
1822 | memset(&sa, 0, sizeof(sa)); | 1821 | signal_no_SA_RESTART_empty_mask(SIGALRM, exit_on_signal); |
1823 | sa.sa_handler = exit_on_signal; | ||
1824 | /* sigemptyset(&sa.sa_mask); - memset should be enough */ | ||
1825 | /*sa.sa_flags = 0; - no SA_RESTART */ | ||
1826 | sigaction(SIGALRM, &sa, NULL); | ||
1827 | alarm(HEADER_READ_TIMEOUT); | 1822 | alarm(HEADER_READ_TIMEOUT); |
1828 | 1823 | ||
1829 | if (!get_line()) /* EOF or error or empty line */ | 1824 | if (!get_line()) /* EOF or error or empty line */ |
@@ -2247,15 +2242,9 @@ static void mini_httpd_inetd(void) | |||
2247 | #if ENABLE_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP | 2242 | #if ENABLE_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP |
2248 | static void sighup_handler(int sig) | 2243 | static void sighup_handler(int sig) |
2249 | { | 2244 | { |
2250 | struct sigaction sa; | ||
2251 | |||
2252 | parse_conf(default_path_httpd_conf, sig == SIGHUP ? SIGNALED_PARSE : FIRST_PARSE); | 2245 | parse_conf(default_path_httpd_conf, sig == SIGHUP ? SIGNALED_PARSE : FIRST_PARSE); |
2253 | 2246 | ||
2254 | memset(&sa, 0, sizeof(sa)); | 2247 | signal_SA_RESTART_empty_mask(SIGHUP, sighup_handler); |
2255 | sa.sa_handler = sighup_handler; | ||
2256 | /*sigemptyset(&sa.sa_mask); - memset should be enough */ | ||
2257 | sa.sa_flags = SA_RESTART; | ||
2258 | sigaction(SIGHUP, &sa, NULL); | ||
2259 | } | 2248 | } |
2260 | #endif | 2249 | #endif |
2261 | 2250 | ||