diff options
Diffstat (limited to 'networking/httpd.c')
-rw-r--r-- | networking/httpd.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 08b40e014..3b948b98d 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1756,22 +1756,19 @@ static int miniHttpd(int server) | |||
1756 | /* set the KEEPALIVE option to cull dead connections */ | 1756 | /* set the KEEPALIVE option to cull dead connections */ |
1757 | on = 1; | 1757 | on = 1; |
1758 | setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on)); | 1758 | setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on)); |
1759 | #if !DEBUG | 1759 | |
1760 | if (fork() == 0) | 1760 | if (DEBUG || fork() == 0) { |
1761 | #endif | 1761 | /* child */ |
1762 | { | ||
1763 | /* This is the spawned thread */ | ||
1764 | #if ENABLE_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP | 1762 | #if ENABLE_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP |
1765 | /* protect reload config, may be confuse checking */ | 1763 | /* protect reload config, may be confuse checking */ |
1766 | signal(SIGHUP, SIG_IGN); | 1764 | signal(SIGHUP, SIG_IGN); |
1767 | #endif | 1765 | #endif |
1768 | handleIncoming(); | 1766 | handleIncoming(); |
1769 | #if !DEBUG | 1767 | if (!DEBUG) |
1770 | exit(0); | 1768 | exit(0); |
1771 | #endif | ||
1772 | } | 1769 | } |
1773 | close(s); | 1770 | close(s); |
1774 | } // while (1) | 1771 | } /* while (1) */ |
1775 | return 0; | 1772 | return 0; |
1776 | } | 1773 | } |
1777 | 1774 | ||