aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-07 22:16:38 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-07 22:16:38 +0000
commit2edbd3738aaa9fa9e45e005c3a04d538f6d99990 (patch)
tree99da76ff0b7eb01650ea6516b74d6a2eb43a5290
parentc3c22a237b88e73f294ff2b9f91b1d2c42d105d4 (diff)
downloadbusybox-w32-2edbd3738aaa9fa9e45e005c3a04d538f6d99990.tar.gz
busybox-w32-2edbd3738aaa9fa9e45e005c3a04d538f6d99990.tar.bz2
busybox-w32-2edbd3738aaa9fa9e45e005c3a04d538f6d99990.zip
httpd: make httpd usable for NOMMU CPUs
git-svn-id: svn://busybox.net/trunk/busybox@18026 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--networking/httpd.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index ee408eb14..72b03de79 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -977,7 +977,20 @@ static int sendCgi(const char *url,
977 if (pipe(toCgi) != 0) 977 if (pipe(toCgi) != 0)
978 return 0; 978 return 0;
979 979
980/*
981 * Note: We can use vfork() here in the no-mmu case, although
982 * the child modifies the parent's variables, due to:
983 * 1) The parent does not use the child-modified variables.
984 * 2) The allocated memory (in the child) is freed when the process
985 * exits. This happens instantly after the child finishes,
986 * since httpd is run from inetd (and it can't run standalone
987 * in uClinux).
988 */
989#ifdef BB_NOMMU
990 pid = vfork();
991#else
980 pid = fork(); 992 pid = fork();
993#endif
981 if (pid < 0) 994 if (pid < 0)
982 return 0; 995 return 0;
983 996