diff options
-rw-r--r-- | P2/lib/utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/P2/lib/utils.c b/P2/lib/utils.c index eda26e9..85bcc37 100644 --- a/P2/lib/utils.c +++ b/P2/lib/utils.c @@ -119,12 +119,12 @@ void shuffle(int nMappers, int nReducers) { printf("%ld\n", message.msgType); msgsnd(id, &message, MSGSIZE, 0); } - for (int i = 1; i <= nReducers; i++) { - struct msgBuffer END = {i, "END"}; - msgsnd(id, &END, MSGSIZE, 0); - } closedir(dir); } + for (int i = 1; i <= nReducers; i++) { + struct msgBuffer END = {i, "END"}; + msgsnd(id, &END, MSGSIZE, 0); + } } // check if the character is valid for a word |