Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<unistd.h>
- int main() {
- int n = 4;
- int pid;
- printf("Hier gibt es 1 Prozess\n");
- for (int i = 0; i < n; i++) {
- pid = fork();
- if (pid == 0) {
- // hier beginnt der child prozess
- printf("Neuer Prozess erstellt\n");
- }
- }
- }
Add Comment
Please, Sign In to add comment