aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-10-04 12:10:54 -0500
committerMatt Strapp <strap012@umn.edu>2020-10-04 12:10:54 -0500
commit429b02ddcc2678c4e1f3749f466013f2bd6d6492 (patch)
treec3a237e87e72fef200fe64d890b69a18a955d8eb
parentAdd to .gitignore (diff)
downloadcsci4061-429b02ddcc2678c4e1f3749f466013f2bd6d6492.tar
csci4061-429b02ddcc2678c4e1f3749f466013f2bd6d6492.tar.gz
csci4061-429b02ddcc2678c4e1f3749f466013f2bd6d6492.tar.bz2
csci4061-429b02ddcc2678c4e1f3749f466013f2bd6d6492.tar.lz
csci4061-429b02ddcc2678c4e1f3749f466013f2bd6d6492.tar.xz
csci4061-429b02ddcc2678c4e1f3749f466013f2bd6d6492.tar.zst
csci4061-429b02ddcc2678c4e1f3749f466013f2bd6d6492.zip
I forgot to add the 1
-rw-r--r--P1/src/mapreduce.c3
1 files changed, 1 insertions, 2 deletions
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