Pass the value from child to parent process
I have this code that is supposed to create three child process' and each will perform a small mathematical operation. Then, the parent is supposed to use the results from all the child process' and get a final answer but I can't find a way to actually read the result from the child in the parent. Is there a way to do this? #include <stdio.h> #include <unistd.h> #include <stdlib.h> int main(void) { int pid1, pid2, pid3, status; int a=1, b=2, c=5, d=4, e=6, f=3, g; int t1, t2, t3; printf("Hello World!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!