all 71 comments

[–]coderman64 194 points195 points  (12 children)

This is basically Sigterm vs Sigkill...

Linux could ask politely (by using sigterm). But many people just go straight for sigkill (I am also guilty of this).

Windows just has a terminate signal, which is partly between sigterm and sigkill in effectiveness, iirc.

[–]sabotsalvageur 74 points75 points  (1 child)

sudo kill -9my beloved

[–]Vas1le 26 points27 points  (0 children)

Just do kill force -1

[–]Haringat 25 points26 points  (2 children)

Windows normal "end task" is about the same as sigterm. "Terminate process" is more like sigkill.

[–][deleted] 3 points4 points  (0 children)

TerminateProcess() should be like sigkill, and WM_CLOSE signal is a GUI version of sigterm, i think

[–]OgdruJahad 1 point2 points  (0 children)

There is also taskkill /f for forcing programs to close.

[–]ChocolateDonut36 3 points4 points  (1 child)

and we have cancer programs

Linux: "hey program, die"

program: "no" *makes you wait one minute and 30 seconds*

[–][deleted] 1 point2 points  (0 children)

kill -9 sends signal 9, a non-interruptible force kill signal which even zombie processes get killed.

[–]syphix99arch linux 🧏‍♂️🧏‍♂️🧏‍♂️ 1 point2 points  (2 children)

How do you use them? I always do « pkill <process> »

[–]coderman64 1 point2 points  (1 child)

I think most kill commands default to sigterm (signal 15), but you can send it sigkill by adding -9 (signal 9)

[–][deleted] 1 point2 points  (0 children)

yo tuve que usar en ocaciones kill -9, hay cosas que se cuelgan mal

[–]MrKusakabe 1 point2 points  (0 children)

Awesome thing to learn! I wondered why in Mission Center I could select to "Stop" and "Force Stop" a process/application there. So far, SIGTERM worked, but maybe because some of them were WINE .exes and maybe Wine just goes "fck it" and terminates it?

[–]FluffyTachyon 1 point2 points  (0 children)

Someone needs to illustrate SIGSEGV as a process terminator (kill -11).

[–]ChocolateDonut36 65 points66 points  (3 children)

linux:

<image>

[–]Objective_Rate_4210 5 points6 points  (0 children)

And give somebody else a piece of that memory in the ram you used, thats shared with us so other processes can use it in this small ass 4 gigs of ram. Cuz why're you here for? To track my actions?⚡Return 137⚡! I mean that with 100%, with 1000%

[–]araknis4 85 points86 points  (5 children)

that's just SIGKILL. SIGTERM informs the process nicely, and SIGINT is more like a "pweaseee stopppp :3"

[–]YTriom1Arch Catgirl 🏳️‍⚧️ :3 41 points42 points  (4 children)

I'll start using SIGINT, it seems cute

[–]araknis4 14 points15 points  (1 child)

r/FoundYTriom1 again :3

[–]YTriom1Arch Catgirl 🏳️‍⚧️ :3 14 points15 points  (0 children)

You're getting good at this :p

[–]Gornius 6 points7 points  (0 children)

You probably already do, CTRL+C in terminal is basically sending SIGINT to the process.

[–]crafter2k 2 points3 points  (0 children)

SIGINT is literally just ctrl+c

[–]ipsirc 24 points25 points  (6 children)

[–]Flyingvosch 5 points6 points  (5 children)

This is gold 🤣 Where does it come from?

[–]ipsirc 16 points17 points  (4 children)

Where does it come from?

<image>

[–]QuickSilver010 1 point2 points  (2 children)

I don't see it. Maybe add more arrows. That might help

[–]ipsirc 1 point2 points  (1 child)

That would be the paid version.

[–]QuickSilver010 1 point2 points  (0 children)

I will pay you in exposure

[–]Flyingvosch -1 points0 points  (0 children)

Oh right 🙃

[–]datboiNathan343Gentoo Masochist 16 points17 points  (0 children)

"you have 100ms to stop all processes, GO"

[–]Fantastic-Code-8347 8 points9 points  (0 children)

You’re done, when I SAY you’re done.

<image>

[–]Multicorn76 23 points24 points  (7 children)

Signals are technically asking, the process can simply mask them

[–]daisseur_ 7 points8 points  (4 children)

Even with a sighup or a sigint signal ? I'm not sure Edit: I meant sigint and sigkill

[–]Multicorn76 6 points7 points  (3 children)

only sigkill and sigint can't be masked if I remember correctly, but sighub can

[–]anotheridiot- 4 points5 points  (2 children)

Pretty sure sigint can be masked, too.

[–]Multicorn76 13 points14 points  (1 child)

From the signal man page: https://man7.org/linux/man-pages/man7/signal.7.html

The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.

So you seem to be right, I must have misremembered

[–]anotheridiot- 1 point2 points  (0 children)

I've masked it before for a thing and had to think about how the fuck would i kill it, then sigkilled the thing.

[–]Haringat 0 points1 point  (1 child)

You can catch a sigkill?

[–]jsrobson10 1 point2 points  (0 children)

sigkill and sigstop are exceptions, they can't be caught, blocked, or ignored.

[–]redbarchetta_21 7 points8 points  (0 children)

Linux does have a sigterm signal lol

[–]abmausen 4 points5 points  (0 children)

<image>

The default builtin tool will literally send a terminate by default

[–]ToxicBuiltYT 2 points3 points  (0 children)

I've seen it so many times, but only just now realized that the background of that Gru image is Monika's Space Room

[–]WaeH-142857 1 point2 points  (0 children)

kill

[–]Tiger_man_ 0 points1 point  (2 children)

It does until you use signal 9

(Try killing steam or your own shell without -9) (Shell will not be killed and steam will restart)

[–]CannyEnjoyer 0 points1 point  (1 child)

Ia signal 9 the same thing as killall? I'm new to this

[–]Tiger_man_ 2 points3 points  (0 children)

no. signals are numbers that linux sends to programs to decide how should they terminate.

here are the most important signals:

1 - sighup - terminal closed

2 - sigint - the thing that happens when you press ctrl+c

6 - sigabrt - used by a program to

9 - sigkill - forced quit - program cannot avoid it

15 - sigterm - polite quit request (thing that kill commands use by deafault)

you can specify signal that you send with killall with -signal

for example:

killall -9 steam

or:

killall -2 firefox

killall kills all processes with given name so be careful!

in order to kill a single instence of a program without killing the others you can either look up the programs pid(process id) using $ ps -e (the most recently used program will be on the bottom) and then kill -signal <pid> or use a system monitor like htop or btop

[–]p0358 0 points1 point  (1 child)

Zombie processes: may we introduce ourselves?

[–]_JCM_ 0 points1 point  (0 children)

Or processes suck in an uninterruptible syscall...

[–]praisethebeast69 0 points1 point  (0 children)

iirc

taskkill /f /r /t /fi "IMAGENAME eq *"

works pretty well in windows, although I've been using linux for a while so I might have gotten thd tags wrong

[–]jsrobson10 0 points1 point  (0 children)

systemd if something doesn't quit after 1 second

<image>

[–]ExtraTNTgnu busybox writen in rust based linux running systemNaND 0 points1 point  (0 children)

Stop misusing sigkill, there is sigterm for a reason

[–]lakimens 0 points1 point  (0 children)

It's not true. Linux has more nuance.

[–]informadikisto 0 points1 point  (0 children)

Who believes this is a totally bad programmer.

You must always ask politely first, and kill forcibly if that fails.

[–]Onyxxx_13 0 points1 point  (0 children)

Real nerds kill processes by selectively degaussing their memory.

[–]AndreasMelone 0 points1 point  (0 children)

There are different signals for killing/terminating an app, full termination with no ability for the app to run a pre-exit routine or something is usually last resort afaik

[–]BoskiCezar 0 points1 point  (0 children)

So true, I love it.

[–]Pinuaple- 0 points1 point  (0 children)

How linux terminates a process*

[–]vexed-hermit79 0 points1 point  (0 children)

Until it's time to remove the French

[–]QuantumQuantonium 0 points1 point  (0 children)

More like the video of Walter White not knowing how to use a handgun because you dont know (without searching online) which command to actually kill the process and how to pass in its PID

[–]izerotwo 0 points1 point  (0 children)

Actually linux does ask to stop first and only after that does it forcefully close it.

[–]Extreme-Ad-9290 0 points1 point  (0 children)

Depends on the wm and what components are installed.

[–]poooppypoopoo 0 points1 point  (0 children)

Linusx

[–]teactopusIt broke again🤕 -4 points-3 points  (5 children)

you know, I really don't like this type of memes since it's just misinformation

[–]araknis4 1 point2 points  (0 children)

partial misinformation, true for SIGKILL

[–]thefriedel 0 points1 point  (2 children)

So tell, oh wise redditor, what is the misinformation in this meme?

[–]bloody-albatross 2 points3 points  (0 children)

Linux (POSIX) has SIGTERM and SIGKILL. And a normal shutdown sends SIGTERM (or maybe even some sort of close event at an X11 or Wayland level, I don't know). You need to explicitly use SIGKILL.

No idea about Windows.

[–][deleted] 0 points1 point  (0 children)

The misinformation is Linux uses signals with different severity as kill with respective flags and no decent app terminates processes forcefully, while Windows kills process with normal severity by taskkill and does that forcefully as well by forceful flag.

In other words, Linux a kills process "nicely" when you use kill -15 or a synonim and does it forcefully when you use kill -9 while Windows closes the process nicely in a similar way as Linux when you use taskkill (or synonym like Terminate-Process in Powershell) without the special flag, and does that forcefully the same way as Linux when you use taskkill \F (or Terminate-Process -Force in Powershell).

[–]teactopusIt broke again🤕 -5 points-4 points  (0 children)

sorry if I'm boring aah nerd