Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case C_MULT:
- ;
- fils0 = fork();
- if(fils0 == 0)
- {
- exit(compute(expr->left));
- }
- else
- {
- fils1 = fork();
- if(fils1 == 0)
- {
- exit(compute(expr->right));
- }
- }
- waitpid(fils0, &status, 0);
- if(WIFEXITED(status))
- sum = WEXITSTATUS(status);
- waitpid(fils1, &status, 0);
- if(WIFEXITED(status))
- sum *= WEXITSTATUS(status);
- return sum;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement