2010/1/12  <ma...@apache.org>:
> Author: markt
> Date: Tue Jan 12 20:30:46 2010
> New Revision: 898496
>
> URL: http://svn.apache.org/viewvc?rev=898496&view=rev
> Log:
> Add note
>
> Modified:
>    tomcat/tc6.0.x/trunk/STATUS.txt
>

>  * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48421
>   Prevent file descriptor leak. Allow a web application's logs to be deleted
>   once the application has been stopped.
> +  I haven't figured out why, but this also prevents buffered log messages 
> being
> +  lost on stop when running as a service.
>   http://svn.apache.org/viewvc?rev=898468&view=rev
>   +1: markt
>   -1:

Some quick thoughts:

1. Stopping from a sh/bat file is performed by a listener, that
received shutdown command on a port. And the listener runs in the same
thread that started the server.

Stopping from Windows service/ Unix jsvc is performed by calling
stop() method using direct access to JVM. Maybe it is a separate
thread, or somehow otherwise the environment is different.


2. I have not followed the code in detail, but some tricks from other
places (maybe not necessary here):
a) setting a TCCL after creating the Cleaner thread, as done in 6u(14
and later) implementation of java logging. (I think won't be needed
here. Just mentioning it).
b) maybe
Runtime.getRuntime().removeShutdownHook(shutdownHook);
(like Catalina#stop() does)
I do not know, whether it would be needed here.


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to