Except Windows doesn’t. You can send WM_CLOSE, but that may not actually bail out of the core loop. PostQuitMessage() works better for some apps, but not at all for windowless CONSOLE subsystem processes. Windows also has a lot of special behavior around generating signals in other processes. It’s a mess.
Like, every time I reboot the reboot UI complains about mysterious, unnamed processes that take suspiciously long to quit.
Having the kernel yank the process out of existence with prejudice is definitely the way to go as apps should be hardened for crashing, anyway.
My PC randomly does this too with program.exe or something. And the dumbest part is, that as soon as I press cancel to close the program myself, it starts shutting down completely! Doesn't even load back into the OS or something, just continues the shutdown like nothing was wrong in the first place.
Ez just nuke processes from the kernel debugger /s
But, real talk, the only comparable thing would be the emergency restart option (go to ctrl+alt+del screen, hold ctrl as you click on the shutdown button)