Created attachment 29490 [details] Patch for changes to catalina.sh to wait till process dies completely In Tomcat 7, when the container is stopped using catalina.sh stop force, the catalina.sh script uses the CATALINA_PID environment variable to send a kill -9 to the pid of the currently running container process. However, this doesn't kill the process instantaneously - say for e.g. when the process is in the middle of a system call or is in the UNINTERRUPTIBLE state. In this case, why cant we use the kill -0 ``cat "$CATALINA_PID"`` >/dev/null 2>&1 trick of checking the liveness of the process before removing the PID file that is used with stop in the non-force mode? This would ensure that the stop force is somewhat synchronous. Just wanted to know if there are good reasons why this was not done. If we don't see any issue with this, I am attaching a patch (to catalina.sh) that is intended to do this. Let me know if there are any questions. Thanks in advance!
Comment on attachment 29490 [details] Patch for changes to catalina.sh to wait till process dies completely Fix MIME type
Thanks for the patch. It has been applied to trunk and 7.0.x and will be included in 7.0.42 onwards.