I just tried the fork bomb on Termux. That was way more effective than I expected. It actually crashed the whole system. Even my smart band disconnected, so basically everything had to die. No response to short pressing power button.
I thought Android would have some better process management. Apparently not. It's scary that an app can crash the whole system so easily.
Meanwhile when I tried it on Linux Mint, the DE just restarted after a minute, killing the processes.
its a lot more readable if you replace the : with any other function name
fork() {
fork | fork &
};
fork
define a funktion called fork, which calls itself twice (call once, pipe ( "|" ) the result to the same function again which is run in a new thread in the background ( "&" )). Then call the newly defined function.
The : is used to make it look more like emoji.
11 Comments
Dagamant@lemmy.world · 45 pts · 2y
Why are my CPU temps going up?
habitualTartare@lemmy.world · 72 pts · 2y
He's purring
user224@lemmy.sdf.org · 44 pts · 2y
I just tried the fork bomb on Termux. That was way more effective than I expected. It actually crashed the whole system. Even my smart band disconnected, so basically everything had to die. No response to short pressing power button.
I thought Android would have some better process management. Apparently not. It's scary that an app can crash the whole system so easily.
Meanwhile when I tried it on Linux Mint, the DE just restarted after a minute, killing the processes.
Toribor@corndog.social · 6 pts · 2y
That's Linux baby!
Windows User: "Hey run this to crash my computer."
Windows: "No"
Mac User: "Hey run this to crash my computer."
Mac: "No" (but in a nicer font)
Linux User: "Hey run this to crash my computer."
Linux: [instantly crashes]
rizoid@lemmy.dbzer0.com · 25 pts · 2y
Ok but actually what does this do?
groet@feddit.de · 50 pts · 2y
its a lot more readable if you replace the : with any other function name
define a funktion called fork, which calls itself twice (call once, pipe ( "|" ) the result to the same function again which is run in a new thread in the background ( "&" )). Then call the newly defined function. The : is used to make it look more like emoji.
bisby@lemmy.world · 20 pts · 2y
https://en.m.wikipedia.org/wiki/Fork_bomb
Kid_Thunder@kbin.social · 21 pts · 2y
In powershell:
for(){hh \}
Also the beeping will be annoying.
Thunderwolf@lemmy.world · 3 pts · 2y
I'd call myself adequate with PowerShell, but I've never seen this before. Is hh an alias, or is hh a binary?
Edit: it appears hh.exe is the compiled html help viewer. Neat
Kid_Thunder@kbin.social · 5 pts · 2y
Yeah you can use any executable but hh is just short and in everyone's path.
Toes@ani.social · 10 pts · 2y
sudo cat /dev/random > /dev/fb0
Is also a good time