Skip to content

Commit

Permalink
Fixed smuos#5 Child process should print the results of median()
Browse files Browse the repository at this point in the history
  • Loading branch information
LYC1929 committed Sep 30, 2014
1 parent e132c21 commit 6bd6d34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ int main(int argc, char *argv[]) {
} else if (rc == 0) {
// Child call median()
double child = median(pt, length);
// Child process should print the results of median()
fprintf(stdout, "This is child processing (pid:%d)\n ", (int)getpid());
fprintf(stdout, "The median value is %d\n", child);
} else if (rc == 1) {
// Parent call mean()
double parnt = mean(pt, length)
double parent = mean(pt, length);
}

return 0;
Expand Down

0 comments on commit 6bd6d34

Please sign in to comment.