-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

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. Sure, you
can register shutdown-hook, but ... eew. That's like, AWFUL, man.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAl9JYPgACgkQHPApP6U8
pFjIxhAAiqinCiRXer/BSW51oMvzCsGPqSXkNCLodYSBgC0FICBco5ZQBcCsYzIK
AOKM4v8vwnjR4uF9Sb1wETj9OqkgLUXseb2w6XKzOXA1xE6KK0m5UM2JMnY+XBeA
KQtUgzeRlKDtYZ801q2FLvOTSqFgF0NirUu9fQhR96fSWDFIH3uimqLb00WeUtfT
mlxHZufuJcwp+cZVW5CXH8qzUvDgAMCsnf7lV70Y3e1oEUuUE04PdtWfAyjoIsN6
3tguqfgAbSXfA6S4b+Q7hsnzu2ncYnJzvl6nj0Lp2+fMacl6wL5DwFIkHJBbru4Q
Fv0wMSFDwVx1nNIR+Mr6JOnxtnmERiDVDDdQE+FAGDuQFysrODJjmcmC1nb23/Db
kQGTBoIXk7W6Rn1n3hT13WAJmlQIrgDETxaswEI3nON7JC5nmPG7G28aI/66mMLb
ozyrmkrFHRd1oeXasgkTGZa3mvR8kwy85IqmGt3QNbWBa68VPZRQaUp96lkj1qiI
PVDo5CQAJxfTOnq5t7PZixq8uc1zIBu3besOP7vgVz2TgmXHF1Zrk/BaUoZYy+5H
VFTog7JjhIZnUBNp7uoq0SsCXfXvrC0dCGkVF5rLE3nxtjkas7LlhmZf4E4QD5zJ
jdI9Mt+keR0CHOyaeGK9P13N/S+EN2qTuwPdoCsDv66ulZtpwds=
=pzzj
-----END PGP SIGNATURE-----

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

Reply via email to