The following reply was made to PR mod_jserv/5755; it has been noted by GNATS.
From: Vladislav Malyshkin <[EMAIL PROTECTED]> To: Ed Korthof <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Cc: Subject: Re: mod_jserv/5755: mod_jserv and httpd -HUP restarting problem Date: Tue, 15 Feb 2000 09:52:44 -0500 Hi, Ed. This patch also fixes this problem. diff -u jserv_wrapper_unix.c.orig jserv_wrapper_unix.c --- jserv_wrapper_unix.c.orig Mon Feb 14 16:16:11 2000 +++ jserv_wrapper_unix.c Tue Feb 15 09:45:59 2000 @@ -362,6 +362,12 @@ jvm_pid = 0; } + /* If we get a TERM signal, shut down the JVM nicely, then exit. + */ + signal(SIGTERM, wrapper_shutdown); + signal(SIGHUP, wrapper_shutdown); + + Ed Korthof wrote: > On Mon, 14 Feb 2000, Vladislav Malyshkin wrote: > > > Hi, Ed. > > It was a problem with wrapper: it does not kill java VM in case of some > > signal delivery. In case of some timing when the signal is delivered the > > value of jvm_pid is 0 and the JVM is not killed. > [snip] > > Hi -- > > The correct solution remains to send a SIGHUP to the parent only, not to > all the children (esp if, as you indicated to me in private mail, this is > sufficient). In any case, that is the correct way to stop Apache -- it > follows the API, and it's in the scripts which Apache distributes. > Sending SIGHUP to all the httpd processes is simply wrong. > > The change which you've shown effectively means that the JVM will recieve > a SIGHUP, rather than being signaled to shut down in the normal fashion -- > that means that servlets are not given an opportunity to shut down, as > required by the Servlet API. Needless to say, I'm not going to apply this > patch. > > If you could explain a bit more about how you think the jserv wrapper > might fail to signal the JVM correctly during normal opperations (which > doesn't includ using killall), I'm willing to look into that, however. I > haven't seen it, but then I've always used manual mode, rather than > automatic, and I'm not currently admining any sites using JServ. > > Ed > -- > See you at ApacheCon 2000 in Orlanda, Florida, March 8-10, 2000. > http://www.Apachecon.com/