-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Mark,
On 8/29/20 20:28, Mark Thomas wrote: > On 28/08/2020 20:54, Christopher Schultz wrote: >> Calder, >> >> On 8/27/20 18:23, calder wrote: >>> On Thu, Aug 27, 2020, 16:16 Christopher Schultz < >>> ch...@christopherschultz.net> wrote: >> >>> [ snip ] >> >>> If you want to *kill* the application and it won't shut down >>> on its >>>> own, SIGKILL is the answer. But that's not a great way to >>>> shut down an application /in general/ because the application >>>> might want/need to do something convenient on shutdown (flush >>>> caches, save state, etc.). >> >> >> >>> SIGTERM is the polite way to ask an application to shut down. A >>> JVM will respond to this signal. (SIGHUP will also initiate a >>> shut down, but TERM is preferred). Using TERM will cause the >>> shutdown hooks to initiate. >> >>> As Chris states, SIGKILL is a last resort (hooks are not >>> called). >> >> If you send a SIGTERM to a Tomcat process, your application's >> ServletContextListeners and stuff like that will not run. > > Yes it will. Tomcat will shutdown cleanly (after cleanly shutting > down any running web applications). Oh really? How does that work? Oh, right. A shutdown-hook. :) >> Sure, you can register shutdown-hook, but ... eew. That's like, >> AWFUL, man. > > You mean like Tomcat already does? Applications don't/shouldn't do > this because Tomcat has already done so. Exactly. Shutdown hooks from web applications should never be done. I don't think of Tomcat as an "application". It does make sense for containers to register such things. - -chris -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl9NFU0ACgkQHPApP6U8 pFjL3g/8DDOQDPdx+tuPw1ecd98u5YEuotkZXfFxl9u266up9fmBG8XubDRS85bX 60etRvJCmcH5lXCsBCmmnrDyK/KaxPDpM4OOMwnuEIfQOrQDN4uA3pz5FncAL1sO VC3XJg9u341M2CHyw4yC0uqshSSWXXAhum3VoKBR82iHMQmlxu8bStwep1V39irS rb4hqUIMi2puIXb8TJXln4oUSh+dL37Y5ksSc+0bk4+xiJF4KwevRbdp8AzoSFMO H85W6Oafzj6R6mWbs2OL09PCxC05A5UqR5BlfspJWTHwT3hq8NeVIlDBWX3tzK8n L5M8gKwjL0UdXmINwJbsjPdesDrQdVwjvqZrIvYFCKl0SIaG2q0vRr2Qi+RmaNIC zG7+U1SR1WQ8nVTnynvo3xP36eXnmyLNFG/4sXvxG30VpiLatpoCMZnNfb7ChtMC waX68CREil12sNgLXP+GGfbWFhxnnBrMoaGI/6/+9Ed8DBwGwGRiOcbN0mxgAOQy 09dpMXsx4bgUTfmYd/GI2bWQW5XoJfz9Z3xzq9UvMsd1RaHSHIFRwxRvQYkw0HZm eKhUYq198FrxR9l+IJirKsZBwgIqYUFHc1p1pdCF14R7l2w94ofHPAEL/Q7Nj1ce SdYsNq73dfaaW+fWwj8t3MLuDjqtQv+gwWQwV+0KzjjZ5wvCIHM= =zfLt -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org