(2021-03-16, 13:05)ray1112 Wrote: It is not my purpose to try all the kill signals.
My goal is to close kodi with the Shutdown (S) command.
You're missing the point. Let me rephrase this:
You: "when my computer freezes, I reach around the back and pull the cable hard, yanking it forcibly out of the socket and cutting power to everything. This is the only way that works."
Me: "That's a pretty drastic way of doing it. How do you know that's the
only way? Have you tried the power switch around the back instead? Or the power button on the front? Or ALT+BREAK?"
You: "It is not my purpose to try different approaches. My goal is to power the machine off"
Hence... "close kodi with the Shutdown (S) command" isn't what you're doing - "stopping the process dead using the kill command" IS. Although this method definitely works, it can have side effects (as you're stopping a process from exiting cleanly).
Take a look at "kodi-send" as this can send messages to the Kodi service (I send a "reset" when Kodi snarls up). I have an alias for "sudo /bin/systemctl restart kodi.service" if kodi has become responsive, so that the OS handles a cleaner service restart.