993
submitted 10 months ago by realitista@lemm.ee to c/comicstrips@lemmy.world
you are viewing a single comment's thread
view the rest of the comments
[-] gnutrino@programming.dev 100 points 10 months ago
[-] Sheeple@lemmy.world 34 points 10 months ago

I don't even get why force shutting a program isn't the fucking default.

[-] pearsaltchocolatebar@discuss.online 53 points 10 months ago

Because you run the risk of corrupting files.

[-] Slovene@feddit.nl 62 points 10 months ago* (last edited 10 months ago)

And then they'd start doing drugs, gambling, taking bribes ...

[-] thisbenzingring@lemmy.sdf.org 11 points 10 months ago

And prostitutes. And shiny metal asses.

[-] Slovene@feddit.nl 9 points 10 months ago* (last edited 10 months ago)

In fact, forget the closing of programs.

[-] dandroid@dandroid.app 48 points 10 months ago

It can be really dangerous for some programs. I don't know too much about Windows, but in Linux, if we try to close a program once, it sends SIGTERM (or SIGINT, I can't remember right now), which basically asks your program to stop. You program can receive that signal and finish things up and exit cleanly. But if your program is deadlocked and can't handle that right now, closing the program again sends it a SIGKILL, which is basically the OS saying, "Get fucked. You're done whether you like it or not."

[-] oce@jlai.lu 8 points 10 months ago

It's not dangerous for programs, it's dangerous for files it may be editing, like not writing some ending characters that leaves the file in a state that cannot be opened by some applications.

[-] dandroid@dandroid.app 5 points 9 months ago

I didn't mean the programs were in danger. When this is done to some programs, it can cause bad things to happen to your computer.

[-] barsoap@lemm.ee 3 points 10 months ago* (last edited 10 months ago)

which is basically the OS saying, “Get fucked. You’re done whether you like it or not.”

Nah, the OS is not really saying anything. Definitely not to the program. It's more of a 1984 shot in the back of your head while you walk down a corridor kind of situation. Also it's not a gun your bits just vanish in the ether. Then it sends a death certificate to the parent, without further explanation.

Side note: Have you ever used killall? Was the standard way to send signals by name instead of PID before pkill. I found out the hard way that it does something rather different on other Unices.

[-] jaybone@lemmy.world 3 points 10 months ago

In your application code, you install signal handlers that better shut your application down when the OS asks you to do so. If your application is hogging resources so hard that it can’t shut down without corrupting files it has opened, then fuck your application. There is a reason the OS (or some user) is sending you that signal.

[-] SorryQuick@lemmy.ca 2 points 9 months ago

That depends how you “try to close the program”. Top/htop/btop often SIGKILL by default. As for closing it legitimately, it depends on your WM and xorg vs wayland. On my DWM setup, I have a keybind for a graceful shutdown and one for SIGKILL.

[-] dandroid@dandroid.app 2 points 9 months ago* (last edited 9 months ago)

Yes, I intentionally didn't want to provide too many details, as I thought it would just be confusing for someone who doesn't already have a lot of background knowledge on the subject.

But specifically, I was talking about command line programs and ending them with Ctrl-C

[-] cmnybo@discuss.tchncs.de 15 points 10 months ago
[-] hakunawazo@lemmy.world 8 points 10 months ago
[-] barsoap@lemm.ee 6 points 10 months ago

The one thing they're missing, which honestly shouldn't happen on at least desktop distros, is the system becoming unresponsive under memory pressure because before the kernel decides to kill off anything it rather swaps its own data structures out to disk, grinding everything to such a crawl that it's indistinguishable from a complete freeze.

The solution is early OOM, which is more aggressive at killing things off and it honestly should be installed and activated by default.

[-] bargh@lemmy.world 2 points 9 months ago

and of course psDooM

[-] Honytawk@lemmy.zip -1 points 9 months ago

Why do you think the bottom one doesn't happen in Windows?

Do you not know the details tab in taskmanager can force close processes that are frozen?

Has the person who wrote that comic not used Windows in like a decade?

this post was submitted on 18 Jan 2024
993 points (97.6% liked)

Comic Strips

12509 readers
3520 users here now

Comic Strips is a community for those who love comic stories.

The rules are simple:

Web of links

founded 1 year ago
MODERATORS