From b9fe3dbcb7b6829ed19abd631f1b725538d4822e Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Tue, 3 Nov 2020 11:01:07 -0600 Subject: fix made problem --- P2/lib/utils.c | 4 ++-- P2/src/mapreduce.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'P2') diff --git a/P2/lib/utils.c b/P2/lib/utils.c index 5c2a738..9a12ff0 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -23,13 +23,13 @@ char *getChunkData(int mapperID) { int mid = openQueue("map"); // printf("%d\n", mapperID); msgrcv(mid, &message, MSGSIZE, mapperID, 0); - printf("\n%s\n", message.msgText); + // printf("\n%s\n", message.msgText); // printf("%d\n", strncmp("END", message.msgText, 3)); if (strncmp("END", message.msgText, 3) == 0) return NULL; char* value = message.msgText; // printf("%s\n", message.msgText); - printf("%s\n", value); + // printf("%s\n", value); return value; //return &(message.msgText); } diff --git a/P2/src/mapreduce.c b/P2/src/mapreduce.c index 7f5e8c4..d021bbd 100644 --- a/P2/src/mapreduce.c +++ b/P2/src/mapreduce.c @@ -77,7 +77,6 @@ int main(int argc, char *argv[]) { // wait for all children to complete execution while (wait(&status) > 0); - closeQueue(openQueue("map")); - closeQueue(openQueue("reduce")); + closeQueue(openQueue()); return 0; } \ No newline at end of file -- cgit v1.2.3