• Raltoid@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    2 months ago
    1. Linux normally does a nice shutdown as well, unless you force it.

    2. You can force it on windows if you really want.

    I’m so tired of linux memes posted/made by people who don’t know much about windows or linux.

    • derpgon@programming.dev
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago
      1. Linux programs either HAVE to be quick while receiving shutdown signal, otherwise the state will be fucked, work will be lost, and people will be mad, and program will stop being used.

      2. Clicking the Windows button to force shutdown will straight up kill the program and won’t care at all.

    • Apytele@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      It was simpler using Linux to just kill things unceremoniously, but my coworkers are also consistently amazed when Epic throws a temper tantrum (rare, but it happens) and I walk over and ctrl-alt-delete and tell it to sit down and shut the fuck up until it’s ready to reboot and act right.

  • Ricky Rigatoni@lemm.ee
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    Windows: Has a complex and graceful shutdown process to make sure programs never close if there’s a problem with them and your computer just stalls on shutdown until you hold down the power button and completely void out the purpose of the graceful shutdown.

  • Realitätsverlust@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    Linux does give every application time to shut down correctly, but unlike windows, it won’t wait for ages until every process is down. Linux WILL shut down in a certain timeframe, whereas windows waits for years if necessary. In my old job, we all had to use windows and I had times where I clicked shut down, turned off my monitor, grabbed my stuff, left and in the next morning, the PC was still on because Notepad refused to just close lmao.

    • WIZARD POPE💫@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      That is what infuriates me so much. Instead of just killing the process after 5 mins of waiting it just cancels the shutdown. Like fuck off with that shit.

  • hector@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    Linux is actually great if you need to implement graceful shutdown with signals – I love it all around :)))

      • Russ@bitforged.space
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        If you hit Ctrl Alt Delete very quickly in succession (I believe it’s 7 times in a row) it will bail out from a stop job and proceed with shutting down

        Learned that trick because I was so tired of seeing that occur ha. Along that research I swear I recall seeing that it’s a KDE/SDDM issue but I might be getting some wires crossed on that (and thus, don’t quote me/take my word on that 😅)

  • astrsk@fedia.io
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    If your app doesn’t respond to SIGTERM gracefully, you need to fix your app. The system did its job as documented.

  • NeatNit@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    Is this even true? I am fairly sure that Linux also has a graceful shutdown process, but I’ll admit I haven’t looked into it.

    • macniel@feddit.org
      cake
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      yeah we have SIGTERM for graceful and SIGKILL for not so graceful shutting down a process.

  • gorlak@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 months 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.