From 429b02ddcc2678c4e1f3749f466013f2bd6d6492 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Sun, 4 Oct 2020 12:10:54 -0500 Subject: I forgot to add the 1 --- P1/src/mapreduce.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'P1') diff --git a/P1/src/mapreduce.c b/P1/src/mapreduce.c index 1f0b2bb..50ca5ca 100644 --- a/P1/src/mapreduce.c +++ b/P1/src/mapreduce.c @@ -27,7 +27,7 @@ int main(int argc, char *argv[]) { pid_t mapperPid; - for (int i = 0; i < nMappers; i++) { + for (int i = 1; i < nMappers; i++) { mapperPid = fork(); if (mapperPid > 0) { //TODO: exec here @@ -57,7 +57,6 @@ int main(int argc, char *argv[]) { pid_t reducerPid; for (int i = 0; i < nReducers; i++) { - if (pid == 0) reducerPid = fork(); if (reducerPid > 0) { //TODO: exec here -- cgit v1.2.3