Created
January 14, 2015 20:28
-
-
Save Dnomyar/6ff9897aaf8d2b27f01d to your computer and use it in GitHub Desktop.
BombFork
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 <stdio.h> | |
#include <signal.h> | |
static void handler(int signum) | |
{ | |
write(1, "NOPE", 4); | |
fork(); | |
} | |
int main(int argc, char const *argv[]) | |
{ | |
struct sigaction sa; | |
sa.sa_handler = handler; | |
sigaction(SIGINT, &sa, NULL); | |
while(1); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment