So, I was bored and decided to go with the same idea as a "fork bomb" with linux but on windows. I understand I need to use the spawn functions to call upon the programs "self". For example if the programs name is blob.exe:
1 2 3 4 5 6 7 8 9 10 11 12
#include <process.h>
#include <stddef.h>
#include <stdio.h>
int main() {
int owned = 1;
if (!spawnl(_P_NOWAIT, "blob", NULL) && !owned) {
return 0;
}
printf("spawned.");
owned = 0;
}
thats what I have, and of course it loops through (the while loop) and prints "spawned" but I dont think its creating a forking/spawning the process/application. Any ideas?