Question: int value = 0; void runner (void *param); /* the thread / int main(int argc, char argv]) pid t pid; pthread t tid; pthread attr
int value = 0; void runner (void *param); /* the thread / int main(int argc, char argv]) pid t pid; pthread t tid; pthread attr t attr; pid = fork(); pid fork) if (pid0child process pthread attr init (&attr); pthread create (&tid, sattr, runner, NULL) pthread join(tid, NULL) printf ("CHILD: value = %d", value); /* LINE C */ else if (pid >0)/ parent process / wait (NULL) printf("PARENT: value td",value) /LINE P vold runner (vold "param) value 5: pthread exit (0) what would be the output from the program at LINE C and LINE P
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
