Windows: If you can't exit gracefully, I'll make sure you never exit at all
Programmer Humor
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
Oh dear, my toe seems to have found the switch on my surge protector. I win.
/c/programmer_ignorance
This meme gets crustier and crustier every time I see it. It’s amazing after all these years people still post this.
Eh, it's funny even if it's inaccurate.
Isn't that what SIGTERM is?
A request to gracefully shutdown processes.
kill, and I swear to god if you're still there when I ps, I'm getting out the -9
alias murder="kill -9"
Yeah, by default kill sends sigterm, and not kill the process at all.
It's the correct behavior, sending sigkill by default would be harmful. Now take a look at how killall worked in Solaris (before it adopted GNU).
Okay that took me by surprise
I'll be sharing this
Please do!
I bet the GUI environments also have their own mechanisms to indicate that the app needs to close, before whipping out the signals.
Systemd waits until the services terminate before shutting down
killall -9
Yup. Sometimes you like to fire a few shots manually just for fun.
Sudo htop
“I wonder how important this is….”
Nothing happens
Hmm
I once accidentally unmounted the system drive. You know what? Aside from some crash messages and a lost battery indicator, the system just kept going.
I finished my Zoom call just fine, finished what I needed to do real quick and then rebooted.
It all went back and was just fine.
A friend of mine has a Laptop, where you can easily pull out out the hard drive while the OS is running. We once did that and it worked kinda fine. After plugging the hard drive back in it continued to run like before.
Which OS?
Linux
Beautiful
In Linux you get zombie processes hanging around when things go wrong, and you can't get rid of those.
Yes you can. You get rid of the zombies by killing the parent process.
Zombies are getting to be parents now?
Woke has gone too far, in my day they would have gotten a bullet between the eyes.
I think zombies go under kernel or "root process" by default now
You can also try signalling the parent with a SIGCHLD. Most of the time it does nothing, and hey, you'd be using a stronger version of the kill command anyway if it doesn't work.
they can be automatically moved to have parent 1 or something like that, so only way to kill them is a reboot. But personally I am yet to setup a stationary (uh, not a laptop) computer and see how it works for me without poweroff at the end of the day
They get moved to the init process (parent 1) if their original parent dies. The init process should always wait on its child processes so they'll get cleaned up then. No reboot needed.
Once they're zombies all they really exist for is to return an exit code for their parent - they're no longer running.
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
Lolol I just needed that yesterday