1

Im planning to port LIGHTTPD to my embedded system. I do not have fork () system call in my environment. I could see #define HAVE_FORK in lighttpd sources, if this is not defined lighttpd will not make any fork calls. So far so good..

But in one of the lighttpd module "mod_cgi", I can see a fork() call which is not protected by the statement if (HAVE_FORK) { ...}

Is there a way to avoid this fork () call in "mod_cgi" also, can I disable this module during compilation ?

Your help is greatly appreciated, can some one comment of this please.

1 Answers1

1

CGI in lighttpd is only supported by communication with an external CGI process (e.g. php-cgi) so the mod_cgi module needs to fork().

If you don't need CGI then just omit mod_cgi from the build (I'd guess in your environment that you'll be omitting almost all the modules; only a couple are mandatory). If you do need CGI then you either have a lot of work to do on lighttpd or you should look at a web server that does CGI in process.

Perry
  • 1,152
  • 10
  • 14