#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main() {
int x = 10;
pid_t p = fork(), t = fork(), s = fork();
printf("PID = %d -> pai: %d -> x = %d\n", getpid(), getppid(), x);
return 0;
}
hi. I need to change the code above, need increment 2 (value on x) to each of the 7 childs. i tried with if but the code repeat the fathers.