diff options
author | Denis Vlasenko | 2006-11-21 10:15:25 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-11-21 10:15:25 +0000 |
commit | 04291bc5aee1e020997894cfd497d14392ad2ced (patch) | |
tree | f9f70d597f2476efe5819b15e8d749725653773f /networking/httpd.c | |
parent | 3eb91c2e3594f379f357bfcc85105b6b76a11781 (diff) | |
download | busybox-04291bc5aee1e020997894cfd497d14392ad2ced.zip busybox-04291bc5aee1e020997894cfd497d14392ad2ced.tar.gz |
httpd: slight reduction of #ifdef forest
few other applets: #ifdef CONFIG_ -> #if ENABLE_
traceroute: fix exposed bugs
defconfig: update
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 08b40e0..3b948b9 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -1756,22 +1756,19 @@ static int miniHttpd(int server) /* set the KEEPALIVE option to cull dead connections */ on = 1; setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on)); -#if !DEBUG - if (fork() == 0) -#endif - { - /* This is the spawned thread */ + + if (DEBUG || fork() == 0) { + /* child */ #if ENABLE_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP /* protect reload config, may be confuse checking */ signal(SIGHUP, SIG_IGN); #endif handleIncoming(); -#if !DEBUG - exit(0); -#endif + if (!DEBUG) + exit(0); } close(s); - } // while (1) + } /* while (1) */ return 0; } |