When you shut down a computer, the operating system (OS, be it linux, windows, other) has data in RAM that needs to be written to permanent storage (SSD/HDD), and some services need to be stopped in a specific order to avoid issues. Say service X depends on service Y, which depends on service Z…you want to stop them in X, Y, Z order. The OS tells apps to shut down, saves what it needs to, and waits for apps to shut down before it turns off background services. If an app doesn’t exit after a timeout, you get the “do you want to kill it” message.
When an app is told to shut down, it has it’s own things to do. Stop work in progress, save changes, save logs, whatever, and then exit. Some apps aren’t written well enough to notice the OS told them to stop. Some *do* notice, but have parts of them that don’t accept being interrupted so they try to shut down and get stuck waiting on something else. Network apps (web browsers, P2P file transfers, etc) are historic offenders here, they’d be waiting for a response from whatever site they were talking to and just…sit there.
If the OS just killed the app without asking, it might lose things you wanted to keep. The last 30 minutes of edits in a document, a huge file you were downloading that hasn’t finished yet, an ML model that’s been training for the past 6 hours, whatever that app is working on. Nobody likes those surprises, so your computer asks if you want to shutdown anyway so you know *why* your stuff is missing the next time you bring it up.
Latest Answers