The following reply was made to PR mod_jserv/5755; it has been noted by GNATS.

From: Ed Korthof <[EMAIL PROTECTED]>
To: Vladislav Malyshkin <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: mod_jserv/5755: mod_jserv and httpd -HUP restarting problem
Date: Tue, 15 Feb 2000 08:09:37 -0800 (PST)

 On Tue, 15 Feb 2000, Vladislav Malyshkin wrote:
 
 > > Apache sets up its own signal handler for SIGHUP -- and I'm a little
 > > hesitant to mess with that.  When that handler recieved a SIGHUP, it
 > > starts the standard Apache cleanup -- I don't think this cleanup is needed
 > > or even appropriate w/in the wrapper process (which isn't like a normal
 > > httpd child)
 > 
 > I think that wrapper needs this cleanup function and first thing which 
 > wrapper must do
 > on cleanup is to stop JVM. Otherwise you may easily get a runaway JVM
 > which will create a serious problem:
 > the only way to start new apache process will be to kill runaway JVM manually
 > and then start apache.
 > So I think instead of adding SIGHUP handler it will be better to implement
 > this cleanup function which will call
 > wrapper_shutdown(0);
 
 grep for 'ap_register_cleanup' within the c source files (particularly
 mod_jserv.c).  Unfortunately, you'll have to follow several layers of
 indirection, but this eventually leads to a call to wrapper_destroy, which
 (under Unix) issues a SIGTERM to the watcher process.
 
 Hmm.  Actually, looking at that again -- I guess you're right that the
 wrapper process should never recieve SIGHUP -- which is exactly what
 happens when you use killall.  It gets SIGTERM through the cleanup process
 in the parent httpd ... so my diagrams were bogus.
 
 But I'll stand by my statement that using killall is simply broken, and
 not (imnsho) worth working around.
 
 good luck --
 
 Ed
 --
 See you at ApacheCon 2000 in Orlanda, Florida, March 8-10, 2000.
                  http://www.Apachecon.com/
 

Reply via email to