]> git.pld-linux.org Git - packages/apache1.git/blob - apache1-lingerd.patch
- added strsignal patch (use strsignal() instead of sys_siglist removed in glibc...
[packages/apache1.git] / apache1-lingerd.patch
1
2 # This is a patch to make lingerd work with Apache and mod_ssl together.
3 #
4 # Installation instructions:
5 #
6 #  1) untar apache, mod_ssl and lingerd
7 #
8 #  2) install mod_ssl, per the instructions in mod_ssl_2.x/INSTALL,
9 #  using "the flexible APACI-only way", which copies files over into
10 #  apache's source tree, but doesn't compile Apache just yet.
11 #
12 #  3) install lingerd per the instructions in lingerd-0.9x/INSTALL.
13 #  when patching the Apache source, use aplinger-ssl.diff (this file)
14 #  instead of the regular apache-1.3/aplinger.diff.
15 #
16
17 --- apache_1.3.39/src/main/Makefile.tmpl.org    Sat Dec  2 16:09:32 2000
18 +++ apache_1.3.39/src/main/Makefile.tmpl        Sat Dec  2 16:23:34 2000
19 @@ -5,13 +5,13 @@
20  LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
21  
22  LIB=  libmain.a
23 -HEADERS= test_char.h uri_delims.h 
24 +HEADERS= test_char.h uri_delims.h li_config.h
25  
26  OBJS= alloc.o buff.o \
27        http_config.o http_core.o http_log.o \
28        http_main.o http_protocol.o http_request.o http_vhost.o \
29        util.o util_date.o util_script.o util_uri.o util_md5.o \
30 -      rfc1413.o
31 +      rfc1413.o ap_lingerd.o
32  
33  .c.o:
34         $(CC) -c $(INCLUDES) $(CFLAGS) $<
35 --- apache_1.3.39/src/main/http_main.c~ 2007-10-23 01:51:50.000000000 +0300
36 +++ apache_1.3.39/src/main/http_main.c  2007-10-23 01:52:32.306586698 +0300
37 @@ -102,6 +102,10 @@
38  #include "http_vhost.h"
39  #include "util_script.h"       /* to force util_script.c linking */
40  #include "util_uri.h"
41 +#define  IN_APACHE
42 +#include "li_config.h"
43 +void lingerd_connect(void);
44 +int lingerd_sendfd(int);
45  #include "scoreboard.h"
46  #include "multithread.h"
47  #include <sys/stat.h>
48 @@ -1575,6 +1578,19 @@
49         return;
50      }
51  
52 +    /* 
53 +     * Try to feed the socket to the linger daemon.  If it fails and
54 +     * we're configured to do so, do a lingering close anyway.
55 +     * Otherwise just close the socket; lingerd will linger on its copy
56 +     * of it.
57 +     */
58 +
59 +    if (lingerd_sendfd(lsd) == 0 || !(LINGER_ON_FAILURE)) {
60 +      ap_bclose(r->connection->client);
61 +      ap_kill_timeout(r);
62 +      return;
63 +    }
64 +
65      /* Set up to wait for readable data on socket... */
66  
67      FD_ZERO(&lfds);
68 @@ -4484,6 +4486,8 @@
69      ap_server_config_defines   = ap_make_array(pcommands, 1, sizeof(char *));
70      pid_table                  = ap_make_table(pglobal, HARD_SERVER_LIMIT);
71  
72 +    lingerd_connect();
73 +
74  #ifdef EAPI
75      ap_hook_init();
76      ap_hook_configure("ap::buff::read", 
This page took 0.039585 seconds and 4 git commands to generate.