mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
14 lines
281 B
C
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();
|
|
}
|
|
}
|
|
}
|