• gorlak@lemmy.world
    link
    fedilink
    English
    arrow-up
    37
    ·
    6 days ago

    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.

    • Chris@feddit.uk
      link
      fedilink
      English
      arrow-up
      48
      ·
      6 days ago

      My work laptop always complains that it can’t shut down the “Shutting down” app when it tries to shut down.

      • bluesheep@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        6 days ago

        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.

    • xan1242@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      6 days ago

      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)