Files
Ciro Santilli 六四事件 法轮功 ca47a77676 fork and fork bomb moved in from cpp-cheat
2019-11-12 00:00:00 +00:00

14 lines
281 B
C

/* 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();
}
}
}