MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/jbkdw4/dont_copy_paste_into_a_shell/g8wa49j
r/programming • u/brandon_lanket • Oct 15 '20
213 comments sorted by
View all comments
Show parent comments
27
It's a forkbomb. Each process forks itself into two processes, so you end up with an exponential number of processes and crash the system.
15 u/dvlsg Oct 15 '20 Intentionally obfuscated a bit, too. : is just a legal name for a function in bash. You could stick any other name there. The && technically isn't part of the fork bomb either.This is basically the same thing, just (slightly) more readable:bomb() { bomb | bomb & }; bomb 0 u/[deleted] Oct 15 '20 [deleted] 1 u/[deleted] Oct 20 '20 Last time I ran a fork bomb I just hit some OS error on Python. 2 u/Living_male Oct 15 '20 Thanks! The wiki explained the syntax nicely, but just pasting it in google didn't work for me.
15
Intentionally obfuscated a bit, too. : is just a legal name for a function in bash. You could stick any other name there. The && technically isn't part of the fork bomb either.
:
&&
This is basically the same thing, just (slightly) more readable:
bomb() { bomb | bomb & }; bomb
0
[deleted]
1 u/[deleted] Oct 20 '20 Last time I ran a fork bomb I just hit some OS error on Python.
1
Last time I ran a fork bomb I just hit some OS error on Python.
2
Thanks! The wiki explained the syntax nicely, but just pasting it in google didn't work for me.
27
u/vikarjramun Oct 15 '20
It's a forkbomb. Each process forks itself into two processes, so you end up with an exponential number of processes and crash the system.