• jet@hackertalks.com
    link
    fedilink
    English
    arrow-up
    33
    arrow-down
    1
    ·
    2 hours ago

    Graceful like closing a laptop and putting it in a backpack only to have windows refuse to shutdown and become a heater until it cooks the battery and ruins the screen…

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

    In Linux you get zombie processes hanging around when things go wrong, and you can’t get rid of those.

  • Scoopta@programming.dev
    link
    fedilink
    arrow-up
    120
    arrow-down
    3
    ·
    edit-2
    6 hours ago

    Ironically it’s actually the opposite. Linux has signals, and with the exception of SIGKILL and I think SIGABRT they can all be handled gracefully. Windows on the other hand doesn’t have signals, it can only TerminateProcess() which is forceful. The illusion of graceful termination on windows is done by sending a Window close message to all of the windows belonging to a given process, however in the event the process has no windows, only forceful termination is available due to the lack of a real mechanism to gracefully terminate processes. That’s why the taskkill command tells you a process requires forceful termination when you run it against something headless.

    • mkwt@lemmy.world
      link
      fedilink
      arrow-up
      40
      ·
      6 hours ago

      Windows does, in fact, have signals. They’re just not all the same as Unix signals, and the behavior is different. Here’s a write-up.

      You’re correct there is no “please terminate but you don’t have to” signal in Windows. Windowless processes sometimes make up their own nonstandard events to implement the functionality. As you mentioned, windowed processes have WM_CLOSE.

      Memory access violations (akin to SIGSEGV), and other system exceptions can be handled through Structured Exception Handling.

      • Scoopta@programming.dev
        link
        fedilink
        arrow-up
        8
        ·
        6 hours ago

        TIL about the console signaling stuff, good to know. I am aware of SEH but that seemed a little too in the weeds for this discussion since that’s as you say akin to SIGSEGV

        • marcos@lemmy.world
          link
          fedilink
          arrow-up
          7
          ·
          4 hours ago

          The NT kernel was all built to emulate object orientation (read Smalltalk, not C++) style message passing. That’s because it was the 90s, and it’s the new technology kernel.

          So yeah, expect everything to have more flexibility sending data around, and no standardization at all so you can’t have any generic functionality.

    • Rhaedas@fedia.io
      link
      fedilink
      arrow-up
      10
      arrow-down
      1
      ·
      6 hours ago

      It also means the OS is in total control of the things it’s running. This goes for running programs, shutting down, and crashing. The only crashes I have on my Linux are when I use up memory, and I’m still convinced that even though everything looks seized up, if I left it for hours or days it would probably end up resolving itself. I’ve had some cases where the OS saw the program wasn’t going in a good direction fast enough and killed it.

      • SaharaMaleikuhm@feddit.org
        link
        fedilink
        arrow-up
        1
        ·
        57 seconds ago

        Most linux systems have two OOM killers, one in the kernel that will execute as a last resort when your system is already frozen up, and one in systemd that should run earlier to prevent your system from freezing up. That one works sometimes, I think it does an okay job actually.

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

      Plus, if something seemingly can’t be terminated with that, 99% of the time it’s a kernel level lockup (e.g. disk IO). At which point you only have 2 options: kill it via a kernel debugger or (the more likely scenario) perform a reboot.

      • cm0002@infosec.pubOP
        link
        fedilink
        arrow-up
        3
        arrow-down
        3
        ·
        edit-2
        2 hours ago

        I kind of love it though it’s like tje fine wine of the internet getting worse and worse yet better and better with time.

        Each repost adds another layer of artifact and grit until you can barely make out what the original even meant. It’s been screenshotted and cropped and saved and shared, on Facebook and Reddit and Xitter who cared? From phone to phone and site to site the pixels crumble day and night!

        The colors fade, the text grows blurry, reposted fast, reposted hurry! Through Discord servers, Instagram feeds and Fedi-instance’s it spreads like mold, like digital weeds! One hundred times! One thousand more! The quality drops right through the floor! And yet we laugh and yet we share this crusty meme beyond repair!

        So let it crumble, let it fray, this meme will live another day. For in its crust we find the truth, the internet’s eternal youth!

        • Quibblekrust@thelemmy.club
          link
          fedilink
          English
          arrow-up
          2
          ·
          21 minutes ago

          The image’s content is plain wrong. Waxing poetic about JPEG artifacts doesn’t make this image any more interesting or funny. It’s just dumb.

  • GregorGizeh@lemmy.zip
    link
    fedilink
    arrow-up
    3
    arrow-down
    3
    ·
    edit-2
    5 hours ago

    In my experience it is more the reverse is true. If a program truly craps out on me in windows i could at least get the task manager to show / use it to terminate the offender or reboot, at least back when i still used it.

    Meanwhile my bazzite task manager is notably not a native part of the OS and takes a few seconds to load, and if the system is in some sort of frozen screen state my only real recourse is hitting the physical force reboot button. The windows manager could sometimes recover from those.

    Overall it is of course a much better experience compared to Windows regardless, but still. Everything being essentially modular pieces compiled into a system can evidently also have minor downsides.

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

      ctrl-alt-f2 (or f3, f4)

      this should switch away from graphical mode to a terminal.

      log in kill whatever needs killin’

    • folekaule@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      3 hours ago

      I have recovered many times from a broken window session in Linux by switching to a console with ctrl-alt-fN, logging in, and either killing the offending program or just rebooting gracefully.

      In Windows my last resort before the nuclear power button is Task Manager with ctrl-esc or ctrl-alt-delete.