• Scoopta@programming.dev
    link
    fedilink
    arrow-up
    149
    arrow-down
    3
    ·
    3 months 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
      68
      arrow-down
      2
      ·
      3 months 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
        9
        ·
        3 months 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
          11
          ·
          3 months 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.

      • Scoopta@programming.dev
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        3 months ago

        You clearly didn’t read my message…I said a “window close message.” I.e…WM_CLOSE. that is not a process signal, it’s a window management signal. Hence taskkill not working without /f on headless processes

        • Feyd@programming.dev
          link
          fedilink
          arrow-up
          2
          arrow-down
          1
          ·
          3 months ago

          Long running headless processes on windows generally still have an event loop and a window handle via which they process those messages.

          • Scoopta@programming.dev
            link
            fedilink
            arrow-up
            2
            ·
            3 months ago

            …right…tell that to cmd.exe or the OpenVPN daemon, or the soft ether VPN daemon, or OpenConsole.exe, or Idk, I only tested 4 that immediately came to mind but my point stands. There are a lot of programs that do not have a window handle and do not bother with window messages.

    • xan1242@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      3 months 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.

  • NeatNit@discuss.tchncs.de
    link
    fedilink
    arrow-up
    54
    ·
    3 months ago

    Stop spreading this lie. Linux has a more graceful shutdown process than Windows ever did. It doesn’t abruptly kill everything.

    • chaospatterns@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 months ago

      Windows has something called the ShutdownBlockReasonCreate API which enables apps with long running operations to prevent a shutdown to avoid corruption or losing work.

      Is there an equivalent for Linux? When used appropriately, it makes shut downs even more graceful.

      • NeatNit@discuss.tchncs.de
        link
        fedilink
        arrow-up
        5
        ·
        3 months ago

        I don’t know the technical details, all I know is that if I click Shut Down while I have unsaved work open, it tells me about it and doesn’t just kill everything.

      • cm0002@infosec.pubOP
        link
        fedilink
        arrow-up
        3
        arrow-down
        8
        ·
        3 months 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!

  • Shanmugha@lemmy.world
    link
    fedilink
    arrow-up
    45
    ·
    3 months ago

    Windows:

    • program refuses to shutdown
    • system: okay, guess you don’t need your computer to turn off anyway
    • JelleWho@lemmy.world
      link
      fedilink
      arrow-up
      12
      ·
      3 months ago

      There is a windows registry hack to set the shutdown wait time for 1s and that did fix it for me. But every update they turn it back to unlimited.

      (I ended up installing Linux, I only have the dnf5daemon server holding the shutdown up for atnost 5min now. But I haven’t tried to fix it)

      • Shanmugha@lemmy.world
        link
        fedilink
        arrow-up
        14
        ·
        3 months ago

        Which is why in my Windows days I got a habit of turning computer off with Windows + R --> shutdown -s -f -t 0

        Windows just works, my ass :)

  • Rolivers@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    37
    ·
    3 months ago

    Windows task manager:

    Let’s play a whack a mole game where the app you’re trying to kill constantly moves up and down a list by default! Enjoy!

    • egrets@lemmy.world
      link
      fedilink
      arrow-up
      22
      ·
      3 months ago

      There’s a non-obvious freeze function in the Task Manager - for as long as you hold the Ctrl key, it’ll stop updating the list. I have no idea why this functionality is hidden, but I guess Dave Plummer had some unusual ideas about UX.

  • Zamboni_Driver@lemmy.ca
    link
    fedilink
    English
    arrow-up
    7
    ·
    3 months ago

    I get it windows is evil and bloated, blah blah blah.

    But to hear some of you describe the problems that you have using windows makes me think that you’re as incompetent as my grandmother.

    • KairuByte@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      I do find it a little amusing the people complain about things that are (an admittedly advanced) config away from being the way they want. As if Linux doesn’t have settings buried in a similar way to registry changes.

  • BeigeAgenda@lemmy.ca
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    3 months ago

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

  • Sam_Bass@lemmy.world
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    3 months ago

    Android ain’t no better. If I don’t pull up my app list and manually kill my media player, it doesnt stop and drains the battery despite tapping the exit menu item

  • PacMan@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    3 months ago

    I killed-9 but if I’m done I’m done and just calling a hard soft reboot with REISUB and if you know you know

    • cm0002@infosec.pubOP
      link
      fedilink
      arrow-up
      7
      arrow-down
      1
      ·
      3 months ago
      Why am I cross-posting .ml content?

      I cross-post from .ml to the nearest relevant non-.ml comm to reduce the influence of .ml comms and indirectly, the instance as a whole, to make it an easier decision for other instance admins to defederate because one key reason I identified that admins don’t want to defederate is because .ml still has some very large comms and some niche comms.

      Megathread on the issue

      Some highlights from the link:

      "Don’t worry guys, the Uyghur Genocide was REALLY just birth control! ~dessalines, .ml admin, dev https://lemmy.world/post/30580167

      “See! nobody died IN Tiananmen Square, just AROUND it, so it doesn’t count!!” ~ Davel, .ml admin https://lemmy.world/post/30673342

      .ml admin, Nutomics continued transphobia https://lemmy.world/post/29222558 The original transphobic Comment from Nutomic: https://lemmy.world/post/18236068

      “NK is actually good and anything counter to that is Western propaganda!” ~dessalines, .ml admin, dev https://lemmy.world/post/31595035

      General negative sentiment to other instances who haven’t “seen the way” yet ~davel, .ml admin https://lemmy.world/post/27426510

      “If you don’t support Russia then you just don’t understand geopolitics” ~dessalines, .ml admin, dev https://lemmy.world/post/27352415

      And so so much documentation on clear heavy handed censorship and bias also on the link. So much I can’t even put them all here because this comment would be really long.

      I believe the behavior of its admins (the main admins are Lemmy devs) does harm to the overall growth of the Lemmy-verse and maybe even the Thrediverse (since Lemmy kinda kicked off the Thrediverse) because of its association with the devs of Lemmy and their insistence to use .ml as their personal political platform to spread harmful propaganda

      On the outside, bringing up Lemmy frequently leads to comments like “Lemmy? Isn’t that the place with a bunch of tankies?” Or “Tried Lemmy, but found it full of pro Russia crap so I left”. The best way forward from that I see is to either widely defederate from .ml like the rest of the Triad, or pressure them to put a fair and unbiased as possible admin team.

      • zarkanian@sh.itjust.works
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        3 months ago

        On the outside, bringing up Lemmy frequently leads to comments like “Lemmy? Isn’t that the place with a bunch of tankies?”

        The only place I hear people even talk about tankies is on Lemmy. You are really in an echo chamber if you think that tankies are the first thing that people think of when you mention Lemmy. In reality, it’s either “What’s Lemmy?” or “Lemmy is too difficult. Federation confuses me.”

        • cm0002@infosec.pubOP
          link
          fedilink
          arrow-up
          1
          ·
          3 months ago

          Idk if you’ve just been under a rock and never noticed (which is admittedly possible, because Reddit just has so many people it’s easier to never notice them) or are just being intentionally deceptive. But tankies are absolutely on Reddit, they have multiple subreddits there. Hell, Lemmy started because dessalines got perma banned from Reddit because of their tankie crap and literally did the bender meme

          I have personally been asked about the tankies on Lemmy and others have seen it too, it absolutely does come up

          • zarkanian@sh.itjust.works
            link
            fedilink
            arrow-up
            1
            arrow-down
            1
            ·
            3 months ago

            I didn’t say anything about reddit. Who said anything about reddit?

            But yeah, you got me. I don’t know anything about this niche reddit community that you’re obsessed with for some reason. I guess that means that I’m living under a rock.

  • TheBannedLemming@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    3 months ago

    I fully support Linux, but Firefox doesn’t deserve that kind of heat. Yes, the Mozilla Foundation has been in hot water over the press release describing the direction and implementation of AI into the browser. But compared to the competition they are still are far better then the rest.