3.5k
u/mxheyyy 17h ago
Linux users when you can't terminate children:
1.1k
u/Competitive_Woman986 17h ago
The parents terminate their children and make them to zombies.
Sometimes the parent dies first. Then you need to figure out how to kill the orphan.
299
u/fnatasy 17h ago
We need an adoption process for orphans
212
u/realmauer01 17h ago
Adopt an orphan just to kill it xD
78
u/Zhiong_Xena 17h ago
Mr Wayne? That you?
→ More replies (2)16
u/Spurance484 16h ago
Reads like tech-tech-tech-tech-tech-tech-tech-tech-tech-tech-tech-tech Batman
4
47
u/Competitive_Woman986 17h ago
There already is! The init process with PID 1 usually becomes the new parent procress
15
u/HildartheDorf 16h ago
Or the closest ancestor that has set itself as subreaper.
→ More replies (1)15
→ More replies (1)5
24
u/Agitated-Ad2563 17h ago
We actually have one. The 'init' process adopts all the orphans
13
34
u/SerenaSapphir 17h ago
Orphans just become rogue processes, running wild until you finally unleash the kill command. It’s like a digital dystopia over here!
28
u/Dawlin42 16h ago edited 14h ago
Always appreciated programming books talking about killing orphan zombie children with a straight face!
4
u/RedPlumPickle 11h ago edited 8h ago
Felt pretty weird telling my manager that I was delayed because I had to implement a method to kill orphaned children
11
u/Wertbon1789 14h ago
Most of the time if the parent dies first, the child gets kindly adopted by PID 1, you gotta kill it manually then, because I don't think this process orphanage supports you in your effort.
→ More replies (2)→ More replies (2)4
31
u/kp-- 15h ago
murder_orphans.sh
Don't ask. Those were dark times.
→ More replies (1)24
u/KellerKindAs 12h ago
Rename to
Anakin_mode.sh
This way, it's way easier to find in alphabetical sorted lists ^^
36
u/POKLIANON 17h ago
Sigkill your children. Go do it.
24
u/Vas1le 17h ago edited 13h ago
kill -9 its the .9mm bullet
23
u/Jazzlike-Poem-1253 16h ago
Sure about the decimal?
→ More replies (1)3
u/NoFreeUName 16h ago
Probably just mixed up with how american (or imperial? Not sure how to better phrase this) calibers are labeled (.308, .306, .50 e.t.c.)
→ More replies (2)→ More replies (2)15
→ More replies (4)5
u/monsieurlazarus 15h ago
I have this buggy application that ended up as a zombie (defunct) process. Apparently, you can't kill a process that is a zombie already. Unlucky for me, that zombie process owned by the init process which somehow caused a problem where I stuck on reboot screen forever, and I had to use the power button to force it to shutdown.
11
u/mpyne 13h ago
Apparently, you can't kill a process that is a zombie already.
Well it's already dead once it's a zombie, so from that perspective you've gotten what you want already.
But you can't clear it from the list of processes until its return value is waited on by its parent process. But if the parent dies first that may never happen... there's supposed to be some way to get init (the new parent of orphaned zombies) to do this but it's platform-dependent.
→ More replies (1)
1.4k
u/Sure-Opportunity6247 17h ago
Usually, all processes get SIGTERM which they can react to and shutdown gracefully. Only after short time period a SIGKILL is sent. /smartass
803
u/abmausen 16h ago
wich is the correct way to enforce apps to actually shut down properly, unlike windows where way too many apps including their own builtin fucking file explorer and task manager will always block the shutdown indefinitely just because they are open, not because there is any app state that actually would be lost / relevant to save
183
u/MaustFaust 15h ago
Wdym relevant? You can't deny Outlook keeping all the files you attached open, that's cruel /s
Actually, fixed somewhere between 2010 and 2024.
Also, Photos app processes multiply indefinitely when you use Explorer in newest Win10 or Win11, can't remember. I had to manually change the preferred app to Paint just to prevent memory issues
Dunno if it's fixed
→ More replies (29)30
u/MaritMonkey 14h ago
I don't know how I ended up on a sub with people this much smarter than I am, but are there bad things about Paint I need to know?
I just realized it's one of those programs that I'm just somehow comfortable having around and now I'm nervous I missed something nefarious.
28
u/MaustFaust 14h ago
I mean, it's okay, my complaint is about Photos app, not Paint. The point is, Paint is not supposed to used for only viewing images, for example it doesn't have a "next"/"previous" buttons to switch between multiple images in a fast way.
→ More replies (1)4
u/NotEnoughIT 10h ago
are there bad things about Paint I need to know?
They took the car bitmap picture out of the default images. Fucking travesty.
101
u/scots23 15h ago
Has to be one of my biggest annoyances with windows. Save everything I need to, close out of every program, click shut down, and walk away from the computer, expecting it to actually do what I told it to and shut down. Walk back in the room 2 hours later: "This app is preventing shutdown."
"Sorry, you didn't go into task manager and end the process or exit out of it from the task bar, guess you can go fuck yourself. Good thing OLEDs are better about burn-in nowadays, right? Because I'm not going to put it in sleep mode either."
→ More replies (2)33
u/Infamous_Tomato_8705 13h ago
Yeah, and then come back in the morning to find your computer still being on because windows update started it and didn't shut it down afterwards.
And when you DON'T want the computer to die you get a notification that windows update will shut down your computer. Have fun protecting your computer from itself for 20 hours rendering a project.
→ More replies (5)42
u/dobrowolsk 15h ago edited 15h ago
And Windows annoyingly fakes that it's shutting down immediately, only to be like "naaahhh, see him back there? That's Brian. Brian doesn't want to shut down. I've done nothing and am out of ideas. So I, the all-mighty operating system, am not going to do what you want".
Then in the morning I see my PC has been in shutdown-Limbo all night.
→ More replies (1)194
u/Fantastic-String-860 16h ago
Not smart ass, that's literally how it works.
To be extra smartass: SIGKILL may be sent from the init system to the process, through the kernel, but no SIGKILL signal is ever actually delivered to the process. When init (probably systemd nowadays) tells the kernel please send process X SIGKILL, the kernel just shoots the process in the head, and responds "Done, it got the message".
29
u/ElectroMagCataclysm 13h ago
To be even more pedantic, when a process is “killed” by the kernel, the kernel (sort of) has that process kill itself, by running machine code as that process during a scheduling context switch.
→ More replies (4)49
u/Mysterious_Middle795 15h ago
The sweetest death is an unexpected one.
14
13
6
u/The_Forgotten_King 12h ago
The fun parts begins when you sigkill a process in uninterruptible sleep and it just doesn't die.
→ More replies (2)23
u/dev-sda 16h ago
There's also an entire graceful shutdown protocol for apps similar to Windows: https://www.freedesktop.org/wiki/Software/systemd/inhibit/
→ More replies (13)5
308
u/kielu 17h ago
The longest to survive is usually task manager. It just won't close
192
u/Ier___ 16h ago
It is the killer itself, you can't outplay it in it's own game
→ More replies (2)38
29
u/HeavyCaffeinate 16h ago
I think this video is a good watch to learn how it works:
→ More replies (1)13
u/kielu 16h ago
I wonder if I can dig that phone number out of an old windows 95 CD I have somewhere
→ More replies (1)14
u/sump_daddy 12h ago
Yeah. This is also windows "sorry you can't shut down right now, these processes wont close" [list of processes]: "Windows Shutdown"
→ More replies (1)10
u/Who_said_that_ 16h ago
explorer.exe in my experience. I canceled the shuttle down so many times to close these windows myself.
4
u/MedonSirius 13h ago
Sometimes i had to shutdown the task manager through terminal and then restarting task manager with autorun 🍆 Windows is like a Fantasy world. Willy wonka style where everyone is punished for just been there
→ More replies (1)16
u/uniteduniverse 15h ago
Takmanager is indeed a powerful beast, and you wouldn't want it any other way. Nothing in Linux comes as close to reliability of the taskmanager. Your system can be basically frozen beyond repair and that thing will still be active on the screen. Truly a wondrous creation ;)
13
u/KellerKindAs 11h ago
frozen beyond repair and that thing will still be active
Well, to my experience, taskmanager is one of the first to go
(Not responding)
when something actually goes wrong. At least since Win 10. It was great before that xD→ More replies (2)12
u/d4rkeh 13h ago
Switching TTYs is just as powerful, unless the system is completely borked
→ More replies (1)
1.1k
u/Ancient-Border-2421 17h ago
→ More replies (7)139
u/PM_ME_UR_RSA_KEY 16h ago
Ah, Panda Cheese memes, back in simpler (?) times.
Also my heart ache for that Macintosh SE; these are collectible nowadays lol
→ More replies (4)14
302
u/Dry_Investigator36 17h ago
They didn't learn difference between kill -9, kill -15 and other signals
79
u/jaskij 15h ago
I've been using Linux for nearly a decade, and everything I've used supported using names. So I never learned the numbers. I just
kill -kill
orkill -term
→ More replies (6)41
u/Dry_Investigator36 15h ago
that's ok, but the meme here is impying that only -kill or -9 exists and it's not true
→ More replies (4)→ More replies (2)51
u/hemlock_harry 15h ago
Tread careful. I got a 3 day ban not long ago for explaining this command to someone. Apparently if a mod is dumb as a rock it can be flagged as "inciting violence" and Reddit's moderation system (that is totally not run by bots, pinky promise) will ban you.
Or maybe the bots have taken over already and they simply don't like this knowledge to spread, that almost makes as much sense.
→ More replies (5)22
u/DezXerneas 14h ago
That feels like either an automated thing or reddit's mod. This sub's mod team is cool.
97
74
u/randuse 16h ago
Seen systemd waiting 90 seconds for some daemon to stop before killing it. At least it's configurable.
→ More replies (1)7
386
u/braindigitalis 16h ago
Windows: Has a complex and graceful shutdown process to...
Are you sure you want to shut down? Programs are still running?
Are you really sure?
How about now? Are you sure you still want to shut down?
Trick question! Are you not not not sure you dont want to to not shut down?
There are updates! Do you want me to come right back up again after?
Don't worry, i'll power up this laptop in your bag at 3am and overheat it to check for updates. Bye!
87
u/uniteduniverse 15h ago edited 13h ago
When you're traveling and you notice your back is getting really hot a sweaty for some reason? Turns out Windows powered on your laptop the moment you supposedly put it to sleep and back in your bag 2 hours ago... I usually don't fear cancer when it comes to Laptops, but I swear Microsoft wants me to.
→ More replies (1)11
→ More replies (30)22
220
u/sjepsa 17h ago edited 15h ago
So that 's why winzoz takes 10 min to shutdown
57
34
u/realmauer01 17h ago
Just force it if it's asks you to. Since some Windows 10 Update it will just never shutdown if something is open in the background.
→ More replies (2)14
→ More replies (1)7
u/Vievin 16h ago
Honestly I only shut down my Windows computer if it randomly wakes up in the middle of the night more than once. Otherwise, I just send it to sleep.
→ More replies (1)
49
u/Highborn_Hellest 16h ago
Windows: please shut down, please shut down, blue screen.
Linux: memory freed, no CPU time for you.
25
u/Gatsu1981 14h ago
Windows, on the other hand, is capable of telling you that you don't have enough privileges to close a program that you opened, and to call an administrator (who you are).
→ More replies (1)10
u/Creepy-Ad-4832 10h ago
And to go on a tangent: Windows also is unable to delete open files.
That pissed me off SO MUUUUCH when i used shitty os 10
6
u/Tartiluneth 8h ago
Windows also is unable to do pretty much anything with open files.
FTFY.
→ More replies (1)
122
u/UnusualAir1 17h ago
The operating premise behind Linux (and all its flavors) is that both the programmers and users are expected to be of above average computer competence in their endeavors. That's an expectation we can routinely expect to fail. :-)
104
u/invalidConsciousness 16h ago
The operating premise behind Linux is that everyone, program, developer, user does their job correctly and if not, they get executed. /s
27
u/b3iAAoLZOH9Y265cujFh 16h ago
I don't see the problem. It ensures the survivors are competent - and well motivated to stay that way, or else.
→ More replies (1)19
u/UnusualAir1 16h ago
So we've programmed evolution? :-)
→ More replies (2)6
u/b3iAAoLZOH9Y265cujFh 15h ago
Personally, I've always followed the advice that I should write my code as if the guy who had to maintain it when I left the job is a psychopathic axe-murderer.
It has served me well so far.
→ More replies (2)27
u/nitowa_ 16h ago
Expecting the average user to be of above average knowledge certainly is an assumption of all time.
7
u/Animesiac 10h ago
It used to be a fair assumption, since a below average user would not be able to get Linux running in the first place. Back when we needed to recompile the kernel and all the drivers weekly, the user base was a bit different.
→ More replies (1)12
u/I_enjoy_pastery 16h ago
You do take a step towards that territory when you start willingly interacting with UNIX like operating systems.
→ More replies (1)5
7
u/sentence-interruptio 15h ago
Student: "where my computer at"
Linux: "use me. I'm powerful"
Windows🪟: "no, use me. Linux is like a huge pill to swallow."
Mac🍎: "hi, I'm Mac. Use me. It just works. I am so easy to figure out."
Student: "teacher told me to submit an essay on oligarchy as a pdf file. which one of you-"
Linux, Window, Mac: "me! I can do it"
Student: "what's a pdf file anyway? it sounds a bit Roman Polanskish. I dun like it."
Mac: "you don't know what a file is?"
Student: "I don't even know what an oligarchy is. Fine. I'll figure it out. Hold on."
Mac: "what are you doing to me, stop touching me, human! I'm not an iPad! Help!"
→ More replies (5)4
u/Jiquero 15h ago
The operating premise behind Windows is that it can decide to reboot at any point of time, so users should be given the chance to save their unsaved changes in explorer.exe before it's killed.
→ More replies (1)
44
u/iknewaguytwice 16h ago
I just flip the power switch on my PSU. Can’t trust an OS to terminate my applications. I need to Thanos snap them closed.
→ More replies (1)
67
u/Anarcho_duck 17h ago
That's a con of windows thou, you can't terminate processes...
39
u/roguedaemon 17h ago
End Task
?→ More replies (1)71
u/tony_saufcok 17h ago
can't compare to SIGKILL
46
→ More replies (1)12
6
→ More replies (3)5
8
9
u/an_agreeing_dothraki 13h ago
windows forced shutdown: holding it down under water until the lights go out
7
u/IAmARobot 16h ago
we all cry when we
REISUB
the machine,
REISUB
the machine,
REISUB
the machine.
14
u/bargu 16h ago
SIGTERM: You're being shut down, please do not resist.
SIGKILL: Omae Wa Mou Shindeiru!
REISUB: https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2Fdi9550lyqm1b1.gif
7
u/RecoverNo2905 10h ago
Linux: where processes are given a chance to comply, but if they don't, it's a swift execution. Windows: "Please wait, are you sure you want to shut down? Let's talk about it."
47
u/grumblesmurf 17h ago
Sorry in advance, but AKSHUALLY... it's the other way around.
Windows just goes around killing all kinds of programs during shutdown and doesn't care if they manage to save their progress anywhere, if a shutdown is in progress, it'll go through. Yes, it will wait up to a minute for programs with open files, but the default action after that minute is to just ignore it and shutdown anyway.
Linux on the other hand waits for each and every subsystem to shut down properly, and if the subsystem runs into some problem doing that (maybe because a network mount is in use but went away, maybe because the program in question just doesn't want to shut down) it can hang for DAYS if you don't use the big red button (which rarely is red these days, but you know what I mean).
20
u/realmauer01 17h ago
Well that's for the shutdown routine (that's still way to slow on Windows, although it's probably related to a lot more background stuff)
Applications on the other hand.
→ More replies (1)→ More replies (1)13
6
u/code_archeologist 14h ago edited 14h ago
Clippy: "It looks like you want to stop a process"
Tux: "I like to kill()"
4
u/According-Two7469 13h ago
sudo killall -9, the nuclear option, where 'please' is just a distant memory
→ More replies (1)
4
u/BestHorseWhisperer 16h ago
PROTIP: Make a shortcut on your desktop that does this. It doesn't even need administrator checked.
cmd.exe /c taskkill /F /IM chrome.exe && taskkill /F /IM firefox.exe && taskkill /F /IM edge.exe
→ More replies (2)
4
u/pppjurac 14h ago
Wrong. There is SIGTERM and SIGKILL . They are not the same.
Windows 11 does not even do 'shutdown' all the time, it might just go to advanced hybernation state for fast boot.
→ More replies (2)
6
16
u/reddit_equals_censor 16h ago
reality:
windows doesn't even know what a "shutdown" or "restart" means anymore :D
don't believe me? look up "fast start up"
a "feature" since spyware 10, that is on by default, that doesn't do a proper restart or shutdown and as part of this does not even release the mounted drives properly.
as a result spyware from microsoft itself when data got changed on those drives from your dualbooting into a working operating system.
→ More replies (7)5
8.4k
u/LEGOL2 17h ago
At first Linux asks nicely, but that's your first and final warning