this post was submitted on 07 Jul 2024
839 points (92.7% liked)

linuxmemes

21282 readers
1411 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.
  •  

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't fork-bomb your computer.

    founded 1 year ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] bjoern_tantau@swg-empire.de 305 points 4 months ago (8 children)

    Fake news.

    Both Windows and Linux have their respective SIGTERM and SIGKILL equivalents. And both usually try SIGTERM before resorting to SIGKILL. That's what systemd's dreaded "a stop job is running" is. It waits a minute or so for the SIGTERM to be honoured before SIGKILLing the offending process.

    [–] sxan@midwest.social 45 points 4 months ago (27 children)

    Also fake because zombie processes.

    I once spent several angry hours researching zombie processes in a quest to kill them by any means necessary. Ended up rebooting, which was a sort of baby-with-the bath-water solution.

    Zombie processes still infuriate me. While I'm not a Rust developer, nor do I particularly care about the language, I'm eagerly watching Redox OS, as it looks like the micro kernel OS with the best chance to make to it useful desktop status. A good micro kernel would address so so many of the worst aspects of Linux.

    [–] CameronDev@programming.dev 82 points 4 months ago* (last edited 4 months ago) (2 children)

    Zombie processes are already dead. They aren't executing, the kernel is just keeping a reference to them so their parent process can check their return code (waitpid).

    All processes becomes zombies briefly after they exit, just usually their parents wait on them correctly. If their parents exit without waiting on the child, then the child gets reparented to init, which will wait on it. If the parent stays alive, but doesn't wait on the child, then it will remain zombied until the parent exits and triggers the reparenting.

    Its not really Linux's fault if processes don't clean up their children correctly, and I'm 99% sure you can zombie a child on redox given its a POSIX OS.

    Edit: https://gist.github.com/cameroncros/8ae3def101efc08be2cd69846d9dcc81 - Rust program to generate orphans.

    load more comments (2 replies)
    [–] MNByChoice@midwest.social 25 points 4 months ago

    Zombie processes are hilarious. They are the unkillable package delivery person of the Linux system. They have some data that must be delivered before they can die. Before they are allowed to die.

    Sometimes just listening to them is all they want. (Strace or redirect their output anywhere.)

    Sometimes, the whole village has to burn. (Reboot)

    [–] aubeynarf@lemmynsfw.com 15 points 4 months ago* (last edited 4 months ago) (6 children)

    Performance is the major flaw with microkernels that have prevented the half-dozen or more serious attempts at this to succeed.

    Incurring context switching for low-level operations is just too slow.

    An alternative might be a safe/provable language for kernel and drivers where the compiler can guarantee properties of kernel modules instead of requiring hardware guarantees, and it ends up in one address space/protection boundary. But then the compiler (and its output) becomes a trusted component.

    load more comments (6 replies)
    [–] Diabolo96@lemmy.dbzer0.com 9 points 4 months ago (4 children)

    RedoxOS would likely never become feature complete enough to be a stable, useful and daily-drivable OS. It's currently a hobbyist OS that is mainly used as a testbed for OS programming in Rust.

    If the RedoxOs devs could port the Cosmic DE, they'd become one of the best Toy OS and maybe become used on some serious projects . This could give them enough funds to become a viable OS used by megacorps on infrastructures where security is critical and it may lead it to develop into a truly daily drivable OS.

    [–] ReveredOxygen@sh.itjust.works 11 points 4 months ago (2 children)

    I believe the next step after that would be to wake up

    load more comments (2 replies)
    load more comments (3 replies)
    [–] jaybone@lemmy.world 8 points 4 months ago (1 children)

    What does this have to do with Rust? Or redox, or micro kernels or Linux?

    load more comments (1 replies)
    load more comments (22 replies)
    [–] Mojave@lemmy.world 35 points 4 months ago (2 children)

    Clicking end task in windows task manager has definitely let the hanging task live in its non-responsive state for multiple hours before.

    [–] bjoern_tantau@swg-empire.de 15 points 4 months ago (2 children)

    Been a while since I've been on Windows but I distinctly remember some button to kill a task without waiting. Maybe they removed it to make Windows soooo much more user friendly.

    [–] Rev3rze@feddit.nl 19 points 4 months ago (2 children)

    Off the top of my head: right click the task and hit end process. That has literally never failed me. Back in windows XP it might sometimes not actually kill the process but then there was always the "kill process tree" button to fall back on.

    load more comments (2 replies)
    load more comments (1 replies)
    [–] Aux@lemmy.world 9 points 4 months ago

    The end task doesn't terminate the app, it only sends a message to the window to close itself. The app will then decide what to do on its own. For example, if the app has multiple windows open, it might close the active one, but still continue running with other windows open. Or it might ignore the message completely.

    [–] SpaceCadet@feddit.nl 11 points 4 months ago (1 children)

    That’s what systemd’s dreaded “a stop job is running” is

    The worst part of that is that you can't quickly login to check what it is (so maybe you can prevent it in the future?), or kill it anyway because it's likely to be something stupid and unimportant. And if it actually was important, well... it's gonna be shot in the head in a minute anyway, and there's nothing you can do to prevent it, so what's the point of delaying?

    [–] bjoern_tantau@swg-empire.de 21 points 4 months ago (1 children)

    so what's the point of delaying?

    In the best case the offending process actually does shut down cleanly before the time is up. Like, some databases like redis keep written data in memory for fast access before actually writing the data to disc. If you were to kill such a process before all the data is written you'd lose it.

    So, admins of servers like these might even opt to increase the timeout, depending on their configuration and disc speed.

    [–] SpaceCadet@feddit.nl 12 points 4 months ago* (last edited 4 months ago)

    I know what it theoretically is for, I still think it's a bad implementation.

    1. It often doesn't tell you clearly what it is waiting for.
    2. It doesn't allow you to checkout what's going on with the process that isn't responding, because logins are already disabled
    3. It doesn't allow you to cancel the wait and terminate the process anyway. 9/10 when I get it, it has been because of something stupid like a stale NFS mount or a bug in a unit file.
    4. If it is actually something important, like your Redis example, it doesn't allow you to cancel the shutdown, or to give it more time. Who's to say that your Redis instance will be able to persist its state to disk within 90 seconds, or any arbitrary time?

    Finally, I think that well written applications should be resilient to being terminated unexpectedly. If, like in your Redis example, you put data in memory without it being backed by persistent storage, you should expect to lose it. After all, power outages and crashes do happen as well.

    load more comments (5 replies)
    [–] MonkderDritte@feddit.de 176 points 4 months ago (2 children)

    SIGTERM is the graceful way tho? It nicely asks programs to please close and cleanup. Unlike SIGKILL, which bombs the shop and creates orphans.

    [–] Thann@lemmy.ml 38 points 4 months ago (3 children)

    And we give steam a fewilliseconds to comply, so IDK what they're complaing about...

    [–] meleethecat@lemmy.world 54 points 4 months ago (1 children)

    Please end your process. You have ten milliseconds to comply.

    [–] Yearly1845@reddthat.com 14 points 4 months ago* (last edited 4 months ago)

    Please do not resist.

    [–] MonkderDritte@feddit.de 9 points 4 months ago* (last edited 4 months ago)

    ?

    You're supposed to close Steam via menu or systray. If you run it in cli, you see that it cleans then a whole bunch up for a few seconds.

    load more comments (1 replies)
    [–] SpaceCowboy@lemmy.ca 18 points 4 months ago (3 children)

    Yup. And you can kill processes in Windows to in the task manager. Or probably with a Powershell command too, but nobody's gonna learn Powershell LOL.

    There's nearly always equivalent functions in both Linux and Windows, just in Windows you gotta click around in more bullshit forms and shit to find stuff. Or learn Powershell, but again, LOL. They are both OSes after all, they do similar things. Just one might do them better than the other.

    [–] capital@lemmy.world 10 points 4 months ago (20 children)

    Why u gotta hate on PowerShell like that? I like it. 😭

    load more comments (20 replies)
    load more comments (2 replies)
    [–] Ironfacebuster@lemmy.world 75 points 4 months ago (2 children)

    Almost every time I restart my Windows PC from an update, it sits on the "closing apps screen" or "restarting" screen then gives up completely and I have to force it to shut down/restart

    And, just about every other time I restart with an update, it closes apps and then just fully shuts down after the update!

    It's super graceful! 😭

    [–] MonkeMischief@lemmy.today 27 points 4 months ago* (last edited 4 months ago) (2 children)

    EVERY TIME!!

    "A program is preventing Windows from shutting down"

    The program : A generic non-descript white box icon with no title.

    Clicking shutdown/restart anyway becomes standard procedure at this point.

    load more comments (2 replies)
    [–] 01189998819991197253@infosec.pub 9 points 4 months ago* (last edited 4 months ago) (10 children)

    "restarting" for 15 minutes. Then crashes. Now I have to reinstall updates and go through it all over again. I hate how crappy the windows update process has become.

    Except for the immutable versions I have, Linux almost never needs to reboot after an update. Upgrades, yes, but not standard updates. And even after upgrades, it just works [(except for one of the immutable versions I have)].

    I usually close all programs before shutting down / rebooting, anyway (a habit I picked up from Win95 days, where it would crash if programs prevented it from shutting down), so I don't really feel this SIGKILL issues.

    load more comments (10 replies)
    [–] NeatNit@discuss.tchncs.de 65 points 4 months ago (3 children)

    Windows' might be complex, but it is NOT graceful. If you have notepad open with unsaved text, then shutdown will never shut down - but nothing on the screen will make this obvious to a non-technical person.

    [–] chellomere@lemmy.world 32 points 4 months ago (1 children)

    Unless there are security updates to install, then everything will be mercilessly killed

    load more comments (1 replies)
    load more comments (2 replies)
    [–] Laser@feddit.org 53 points 4 months ago* (last edited 4 months ago) (3 children)

    SIGTERM is a graceful request to the application to terminate itself and despite their names kill and killall default to SIGTERM (also useful to send other signals to processes, like START, STOP and NOHUP).

    kill -9 though...

    [–] RustyNova@lemmy.world 29 points 4 months ago

    "You should terminate yourself, NOW!"

    load more comments (2 replies)
    [–] phoenixz@lemmy.ca 36 points 4 months ago (3 children)

    Linux actually also has a graceful shutdown process. It tells apps its shutting down by sending SIGTERM, and its up to each process to flush data asap, do whatever they gotta do, and then shut down.

    If they don't listen then linux will indeed pull out the ~~baseball bat~~ ~~chainsaw~~ katana and make processes die whether they want to or not.

    load more comments (3 replies)
    [–] BmeBenji@lemm.ee 29 points 4 months ago* (last edited 4 months ago) (2 children)

    The number of times I have had the Windows shutdown process tell me “please close <some windows process that I never opened> before shutting down” is fucking annoying. Wipe your own ass, Windows.

    [–] SkaveRat@discuss.tchncs.de 15 points 4 months ago

    Bonus points if that exact dialogue is the cause. Had that happen more than once. No idea how

    load more comments (1 replies)
    [–] dan@upvote.au 21 points 4 months ago (2 children)

    The image fails to load for me.

    [–] ikidd@lemmy.world 24 points 4 months ago

    pkill -9 firefox

    [–] shekau@lemmy.today 8 points 4 months ago

    LOL, it finally loaded for me after few moments

    [–] jet@hackertalks.com 20 points 4 months ago (9 children)

    Every computer should have a hard cutoff power switch, when thrown it cuts all physical electricity.

    Off means off.

    The current trend of soft power buttons, parasitic loads to service impi, or management engines wol, etc is just bad practice and removes agency from the user.

    Who hasn't wanted to turn off a laptop to put it in a bag only for the shutdown to trigger an update that takes 10m whole your running late, so the laptop overheats. Or worse, the laptop turns on while in the bag!

    The fact windows has a poor ability to apply updates live or In a a/b fashion is no excuse for soft poweroff buttons. Sure it's nice to flush file system write through caches, but Ive been burned by fake power off far more then incomplete file writes.

    load more comments (9 replies)
    [–] nucleative@lemmy.world 19 points 4 months ago (5 children)

    EarlyOOM is your friend. Tweak it to save the most important stuff and kill irrelevant stuff first when low on memory.

    load more comments (5 replies)
    [–] Beaver@lemmy.ca 17 points 4 months ago

    Firefox is becoming the villain.

    [–] OR3X@lemm.ee 17 points 4 months ago (2 children)

    Meanwhile Windows regularly gets hung up for several minutes on the "shutting down..." screen for no fucking reason. Only happens when I'm in a hurry too.

    [–] Tryptaminev@lemm.ee 10 points 4 months ago (1 children)

    i love it when the "this program is keeping the computer from shutting down" program is the shutting down program

    load more comments (1 replies)

    Then randomly reboots anyway even though you said don’t install updates and reboot.

    [–] johannesvanderwhales@lemmy.world 15 points 4 months ago

    Meanwhile I click that "shut down anyway" button immediately. Fuck you Outlook.

    [–] then_three_more@lemmy.world 14 points 4 months ago (2 children)

    In windows open command prompt type

    shutdown /f /s /t 0

    [–] Zacryon@lemmy.wtf 17 points 4 months ago* (last edited 4 months ago)

    Translation:
    "Shutdown. Fucking shutdown, trash!"

    [–] Agent641@lemmy.world 12 points 4 months ago

    Better yet, put this in a batch file set to run at start up. On your friends PC of course

    [–] uis@lemm.ee 13 points 4 months ago (2 children)

    echo b > /proc/sysrq-trigger

    load more comments (2 replies)
    [–] OneCardboardBox@lemmy.sdf.org 9 points 4 months ago (1 children)
    load more comments (1 replies)
    [–] humorlessrepost@lemmy.world 8 points 4 months ago* (last edited 4 months ago) (1 children)

    No Mercy

    Where do you go, my lovely?

    load more comments (1 replies)
    load more comments
    view more: next ›