summaryrefslogtreecommitdiff
path: root/www/apache21/files/patch-server:main.c
diff options
context:
space:
mode:
authorHye-Shik Chang <perky@FreeBSD.org>2002-07-21 02:23:33 +0000
committerHye-Shik Chang <perky@FreeBSD.org>2002-07-21 02:23:33 +0000
commit1e1df07282d1c7a98c7ffae7e7e6c6d2a9c7af27 (patch)
treea2c9837d1f55698fe9363480361ee810419249fb /www/apache21/files/patch-server:main.c
parentBump portrevision (textproc/expat2 shlib bump). (diff)
- Add a small hack for worker MPM [1]
(worker MPM with this hack seems to work without visible problems. and still requires -DFORCE_THREADING_MPM to build for worker MPM.) - Fix plist for worker MPM - Comment out fancy modules from default httpd.conf Tested on: ref5.freebsd.org, several 4-stable machines [1]
Notes
Notes: svn path=/head/; revision=63298
Diffstat (limited to 'www/apache21/files/patch-server:main.c')
-rw-r--r--www/apache21/files/patch-server:main.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/www/apache21/files/patch-server:main.c b/www/apache21/files/patch-server:main.c
new file mode 100644
index 000000000000..d297d4425fdb
--- /dev/null
+++ b/www/apache21/files/patch-server:main.c
@@ -0,0 +1,36 @@
+--- server/main.c.orig Thu Jun 13 04:34:56 2002
++++ server/main.c Sun Jul 21 08:54:09 2002
+@@ -78,6 +78,11 @@
+ #include "ap_mpm.h"
+ #include "mpm_common.h"
+
++#ifdef FREEBSD_THREAD_HACK
++#include <unistd.h>
++AP_DECLARE(int) ap_exists_config_define(const char *name);
++#endif
++
+ /* WARNING: Win32 binds http_main.c dynamically to the server. Please place
+ * extern functions and global data in another appropriate module.
+ *
+@@ -558,6 +563,21 @@
+ destroy_and_exit_process(process, 1);
+ }
+
++#ifdef FREEBSD_THREAD_HACK
++ {
++ int r;
++
++ if (! ap_exists_config_define("NO_DETACH")) {
++ if ((r = fork()) > 0)
++ return 0;
++ if (r == -1) {
++ perror("fork");
++ return 0;
++ }
++ setsid();
++ }
++ }
++#endif
+ ap_process_config_tree(server_conf, ap_conftree, process->pconf, ptemp);
+ ap_fixup_virtual_hosts(pconf, server_conf);
+ ap_fini_vhost_config(pconf, server_conf);