On Wed, 28 Jun 2000, jean-frederic clere wrote:
> Hi,
>
> I have found a small problem in src/c/jserv_ajpv12.c.
> As the option SO_LINGER is not set to the socket the shutdown signal is
> not received in our BS2000 machine.
> I have found it because the argument -prof:/opt/apache/logs/java.prof of
>
> JVM was not working, of course: The JVM was killed by the wrapper
> process!
>
> I have put a #define _OSD_POSIX but I think a piece of code is needed in
>
> most plateforms, like the sock_enable_linger routine of
> src/main/http_main.c (apache_1.3.12).
> Please include the patch in CVS for the next JSERV release.
>
> Regards
>
> Jean-frederic CLERE
[snip patch]
The use of SO_LINGER should be wrapped with ifdef's somehow. If we
really need something like this on other systems, then I'd like to
either use Apache's system or copy it.
On some older systems, SO_LINGER causes leakage of kernel-level
resources. On others it does nothing, or works incorrectly;
consequently, the code in src/main/http_main.c wraps it in "#ifdef
USE_SO_LINGER" -- many systems don't use it (mine, for example -- Linux
2.2.1x). These systems wind up using a function called lingering_close
which duplicates some of the functionality which SO_LINGER is supposed
to provide.
Anyway, +1 for inclusion as shown (w/ the _OSD_POSIX requirement); +1
for including it after it to use either lingering_close or SO_LINGER
depending on what Apache's configuration says for USE_SO_LINGER and
NO_LINGERING_CLOSE. (I know this can be done easily if mod_jserv is
compiled within the Apache source directory; I'm not sure how easy it is
using apxs. I'm willing to try to get it working, but I dunno if it's
really possible ...)
thanks --
Ed
--
----------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]