fork and fork bomb moved in from cpp-cheat

This commit is contained in:
Ciro Santilli 六四事件 法轮功
2019-11-12 00:00:00 +00:00
parent 762cd8d601
commit ca47a77676
4 changed files with 191 additions and 6 deletions

View File

@@ -0,0 +1,13 @@
/* https://cirosantilli.com/linux-kernel-module-cheat#fork-bomb */
#define _XOPEN_SOURCE 700
#include <string.h>
#include <unistd.h>
int main(int argc, char **argv) {
if (argc > 1 && strcmp(argv[1], "danger") == 0) {
while (1) {
fork();
}
}
}