this post was submitted on 18 Jan 2024
976 points (97.7% liked)

Comic Strips

18511 readers
1924 users here now

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

The rules are simple:

Web of links

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] Sheeple@lemmy.world 30 points 2 years ago (8 children)

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

[–] dandroid@dandroid.app 43 points 2 years ago (6 children)

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."

[–] SorryQuick@lemmy.ca 2 points 2 years ago (1 children)

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 2 years ago* (last edited 2 years 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

load more comments (4 replies)
load more comments (5 replies)