Understanding the "fork bomb" an 11 character string that can crash Windows, Mac, or Linux machines

Originally published at: Understanding the "fork bomb" an 11 character string that can crash Windows, Mac, or Linux machines | Boing Boing

2 Likes

My first foray into coding ended with me accidentally creating a fork bomb and crashing good ol’ Windows XP.

6 Likes

7 Likes

This is the infamous fork bomb:

:(){ :|:& };:

Windows doesn’t have a fork equivalent but you can do something like this:

%0 | %0

Which will eventually have a similar effect but not really the same thing. In the Unix version it’s infinitely and exponentially creating copies of itself. In the Windows version it’s just launching a bunch of processes.

6 Likes

This really isn’t much of an issue in modern linux’s running under systemd because of how cgroups are done.

3 Likes

Back in the day it was useful for testing timing issues.

Typical of systemd, it even breaks fork bombs!!

/sarcasm in case it’s not obvious

2 Likes

Why does the porridge bird lay its eggs in the air?

This topic was automatically closed after 5 days. New replies are no longer allowed.