[PATCH] Fix another httpd breakage on no-MMU

Alex Landau landau_alex at yahoo.com
Thu Jun 21 08:51:13 UTC 2007


Hi,

Another round of fixes to httpd for no-MMU.
httpd can't work in non-inetd mode since it is required to fork for each connection.
There are 2 approaches I can think of:
1. The correct one: on connection, the parent vforks and the child reexecs itself to
serve the connection.
2. The easy one: require -i (inetd mode) and #ifdef the code that prevents compilation on
no-mmu (the code running bb_daemonize).

The attached patch goes the second way for 2 reasons. First, the second way is much
easier, so we get a working httpd. Second, I'm not sure that it's benefiting to reexec
httpd on every connection, since inetd does exactly that. And, of course, the most
important reason: I'm lazy ;-)

Alex

P.S. On compilation a warning shows telling that openServer() is defined but not used.
This function is used only in non-inetd mode. I did not wrap it in #if !BB_MMU since if
later someone goes with way 1 (above), he'll need it, and since it's static, it does not
reach the .o file.


 
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time 
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news
-------------- next part --------------
A non-text attachment was scrubbed...
Name: httpd.diff
Type: text/x-patch
Size: 1079 bytes
Desc: 1578714670-httpd.diff
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070621/74a803ab/attachment-0002.bin 


More information about the busybox mailing list