• astrsk@fedia.io
    link
    fedilink
    arrow-up
    14
    ·
    48 minutes ago

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

    • Jakeroxs@sh.itjust.works
      link
      fedilink
      arrow-up
      3
      ·
      21 minutes ago

      I’ve tried to turn a pc off to go to sleep, only to realize in the morning it’s still on because some program refused to close.

      Now when I see the prompt to force close, I just say yes.

  • chronicledmonocle@lemmy.world
    link
    fedilink
    arrow-up
    69
    ·
    4 hours ago

    Linux gives processed a chance to gracefully close. However, it also will absolutely NOT allow a process to hang up the shutdown or restart procedure after a point. If you’re using systemd (which there is a good chance you are), it’ll count down. If the process hasn’t stopped in the time allotted, it gets Old Yellered.

  • Raltoid@lemmy.world
    link
    fedilink
    arrow-up
    236
    arrow-down
    2
    ·
    edit-2
    8 hours 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.

    • Shanmugha@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      edit-2
      49 minutes ago

      Oh, p-lease, can force it my ass, Linux has never failed to shutdown on me when using plain obvious GUI method. windows - can easily hang on forever as long as computer stays powered. The point of all the memes is exactly insane windows defaults, not the things that can or can’t be done by someone with enough knowledge

    • cmgvd3lw@discuss.tchncs.de
      link
      fedilink
      arrow-up
      27
      ·
      edit-2
      6 hours ago

      Absolutely, if people agree or not, the core windows is still a pretty powerful operating system. Its sad that they are ruining it by adding crap into it.

        • criticon@lemmy.ca
          link
          fedilink
          arrow-up
          7
          ·
          3 hours ago

          Some clarification of the command

          -r #restart

          -s #shutdown

          -t 00 #wait 0 seconds

          -f #forced

            • Laurel Raven@lemmy.zip
              link
              fedilink
              English
              arrow-up
              4
              ·
              58 minutes ago

              I can’t speak for them if they’re joking or not but it’s something you can absolutely do. *.bat files (short for “batch”, as in a batch of commands to execute in sequence) are the script files for the Windows command line, and can be executed by double clicking on them

              • jmacapp@lemm.ee
                link
                fedilink
                arrow-up
                1
                ·
                16 minutes ago

                Thanks, I’m familiar with batch files. This just seems like a very bad way to perform a shutdown, especially when running a UI Desktop windowing system. And even if that shutdown command is fully supported from the GUI, I would guess you need to be admin to run it, which means you can run the bat file as admin, so if you can edit the file or modify the env in which it runs (e.g. PATH) it seems like it could be a security problem. And if you don’t need to be root to run the shutdown command, that seems like its own problem. I suppose Windows still has the “run as administrator” from the context menu so maybe that helps.

        • kewko@sh.itjust.works
          link
          fedilink
          arrow-up
          5
          arrow-down
          6
          ·
          7 hours ago

          If -t is specified -f is assumed and redundant, but also it will try to do graceful l, but with a patience of a cranky toddler

          • aeiou_ckr@lemmy.world
            link
            fedilink
            arrow-up
            16
            ·
            7 hours ago

            Not really. If -f (force) is removed windows will shutdown similar to pressing the shutdown button and will wait for your input regarding open programs. -f is needed to just just “do it” with no hesitation or response from the user.

            • kewko@sh.itjust.works
              link
              fedilink
              arrow-up
              3
              arrow-down
              5
              ·
              edit-2
              6 hours ago

              Straight from the doc

              /t <xxx> Sets the time-out period before shutdown to xxx seconds. The valid range is 0-315360000 (10 years), with a default of 30. If the timeout period is greater than 0, the /f parameter is implied.

              • Lupus@feddit.org
                link
                fedilink
                arrow-up
                23
                ·
                6 hours ago

                Sooo when you use the prompt

                Shutdown.exe -r -t 00

                You would need the -f since we defined the timeout period as 0. Because:

                If the timeout period is greater than 0, the /f parameter is implied.

      • Dave@lemmy.nz
        link
        fedilink
        arrow-up
        15
        ·
        8 hours ago

        The process manager lets you kill any process.

        You can also click the do it anyway button when it’s waiting on shutdown, but I’ve had less consistent success with that.

    • Apytele@sh.itjust.works
      link
      fedilink
      arrow-up
      8
      ·
      8 hours 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.

  • Comrade Spood@slrpnk.net
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    4 hours ago

    To the people complaining Windows has an aggressive method. Sure but I didn’t know about it till now. Task manager didn’t make it obvious to me and so I didn’t know about it till now (and everyone keeps talking about commands and shutdowns so it doesn’t even sound like you can do it through task manager). Linux’s system manager did and I have known about it since first using Linux (about half a year ago now)

      • swab148@lemm.ee
        link
        fedilink
        English
        arrow-up
        9
        ·
        4 hours ago

        He wrote Pulseaudio, Avahi, and systemd before joining Microsoft, where he currently works.

            • acockworkorange@mander.xyz
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              4 minutes ago

              Great talk indeed. And I will quickly acknowledge that something had to be done, and that systemd had the courage to innovate and address the issues. I just wish it did so in a more transparent way to the end user.

              For instance: there’s a whole established system of dealing with logs in place. Why build a separate one just for your init system? Why binary? Why even integrate it with your init? I’m not saying storing everything on /var/log and using logrotate is ideal or even covers all use cases. But a log management system is its own thing.

              That’s just an example of how systemd didn’t jive with every other subsystem in a Unix like OS. It could have been done in a Unix way - small cohesive tools that are good at one job and can be combined to do more together.

              That’s where I think he missed the mark when dismissing the monolithic criticism by saying “it’s not a single binary so it’s not monolithic”. Its philosophy is monolithic.

              That said, I use systemd on my machines because that’s what my do uses and I don’t think it’s a reason to swap distros. For the same reason I use Linux and not a micro kernel. I.e. philosophy is important, but implementation is importanter.

          • silasmariner@programming.dev
            link
            fedilink
            arrow-up
            3
            ·
            3 hours ago

            One task lifecycle management tool to bring them all, one tool to find them. One tool to rule them all and in the darkness bind them.

    • DannyBoy@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      7
      ·
      5 hours ago

      Not only do I get this on shutdown I get a job on startup that runs for a minute thirty that looks for a swap partition that I have deleted.

      • B-TR3E@feddit.org
        link
        fedilink
        arrow-up
        4
        ·
        edit-2
        4 hours ago

        Did you delete it or comment it out in /etc/fstab? Adding

        noresume
        

        to your boot arguments should also help. You can try that out in “extended options” during boot and add it to /boot/grub/grub.cfg later. Don’t forget to run

        update-grub
        

        after editing.

        • DannyBoy@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          3
          ·
          3 hours ago

          Yeah I just deleted the swap partition without updating anything. I’ve realized since then I need to update the fstab but I never think about it until the odd time I do a full reboot.

      • BCsven@lemmy.ca
        link
        fedilink
        arrow-up
        3
        ·
        3 hours ago

        As comments below you will need to check /etc/fstab and then run a mkgrub or mkgrub2 command with options like -o (you will have lookup the full string) and it will rewrite the info that the system is told at boot about drive partitions

      • alt_xa_23@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        5 hours ago

        I’ve had that problem before, I think I had to mess around with my fstab and grub config to fix it.

        • B-TR3E@feddit.org
          link
          fedilink
          arrow-up
          4
          ·
          4 hours ago

          Yes. Deleting partitions without editing /etc/fstab is a nice way to render your system unbootable.

      • Azzu@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        2 hours ago

        systemd moment in the sense that someone not affiliated with systemd used systemd to write a stop job that doesn’t terminate quickly? Or that you willingly installed software that brought along a slow stop job with it?

        This is like so far away from systemd’s fault, idk, it must just be a meme right?

        • juipeltje@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          52 minutes ago

          Pretty sure i’ve had this happen with services i didn’t even create, but yeah it was just a joke, i don’t care about init systems, but i don’t recall this ever happening when i was using runit.

  • NeatNit@discuss.tchncs.de
    link
    fedilink
    arrow-up
    65
    ·
    8 hours 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
      link
      fedilink
      arrow-up
      54
      ·
      8 hours ago

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

      • palordrolap@fedia.io
        link
        fedilink
        arrow-up
        19
        ·
        5 hours ago

        In order of decreasing politeness: 1, 2, 15, 9 = HUP, INT, TERM, KILL = “Please stop”, “Quit it”, “I’m warning you” and “BANG”

          • palordrolap@fedia.io
            link
            fedilink
            arrow-up
            5
            ·
            5 hours ago

            True. I think of it more as a semantic shift. In the old days, processes would actually quit and some other process would resurrect it as necessary, but then someone had the idea of having some processes catch the HUP and do all that itself without actually bothering any other processes.

            And the implementation might actually involve an exec of the process’ own executable, meaning that it actually does self-terminate, but it leaves a child in its place.

        • BCsven@lemmy.ca
          link
          fedilink
          arrow-up
          2
          ·
          3 hours ago

          9 kills all 9 lives is they way the hpunix guy explained it to me in the mid 90s

  • jonathan@lemmy.zip
    link
    fedilink
    arrow-up
    39
    ·
    8 hours ago

    I feel this meme was created by someone who didn’t actually know Windows in depth and recently learned of the kill command. Which by default just asks the process nicely to terminate itself.

  • gorlak@lemmy.world
    link
    fedilink
    English
    arrow-up
    34
    ·
    9 hours 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
      41
      ·
      8 hours 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
        1
        ·
        1 hour 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
      4 hours 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)

    • Björn Tantau@swg-empire.de
      link
      fedilink
      arrow-up
      32
      ·
      8 hours ago

      Yeah, this meme is bullshit but gets still posted every other month or so. Windows can also just kill a process, similar to sigkill.

      • silasmariner@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        3 hours ago

        I don’t mind a bullshit meme, most memes are bullshit. Sometimes the bullshittery itself is the funny bit, or to put it another way, there are times like this where the absurdity of it is what’s funny to me. Like, Linux’s kill levels operate, as they must, as advice to the running process, because the os has no insight or capability as to how to gracefully close a process - nor should it. It’s an impossible task to know what safe cleanup looks like. But I like the image of the Linux penguin shooting Firefox tbqh