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.