Skip to content

Commit

Permalink
Resolve issue smuos#5: Child prints median
Browse files Browse the repository at this point in the history
  • Loading branch information
JINGJINGTANG committed Sep 27, 2014
1 parent 721c58c commit 7ab38a0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Binary file modified mm
Binary file not shown.
3 changes: 1 addition & 2 deletions mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ int main(int argc, char *argv[]) {
exit(1);
// The child process
} else if (rc == 0) {
median(length, pt);
fprintf(stdout, "\nThe median is: %f", median(length, pt));;
// The parent process
} else {
mean(length, pt);
}

fprintf(stdout, "\nThe mean is: %f", mean(length, pt));
fprintf(stdout, "\nThe median is: %f", median(length, pt));
fprintf(stdout, "\n%s: FIN. \n", argv[0]);

return 0;
Expand Down

0 comments on commit 7ab38a0

Please sign in to comment.