2 ms·
I accidentally wrote a fork bomb in a shell script last week. It went like this: foo() { echo "$1" | foo } Then called foo later. The 2nd occu
by asveikau 7y ago
I accidentally wrote a fork bomb in a shell script last week. It went like this:
foo() {
echo "$1" | foo
}
Then called foo later. The 2nd occurrence of foo was a typo for something with a very similar name. Took me a few reboots before I realized this.
I find this a bit more interesting than the cited shell example because it does not involve the & token. Just pipes.
- hinkley 7y agoI related a story recently about a casual friend who decided to mess with me by using email spam. Instead of learning to do loops in csh, he wrote a recursive variant a lot like what you have here. He had to go to the admin to get back into his account. My favorite bit was he showed me the code, I saw the problem and rather than telling him how to flood my mailbox properly (because really, who would?) I just said, "You don't want to do that..." and walked away.