From f4c4da9c723febab79540a43ec2d0fb6b7b8b97c Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Sat, 3 Oct 2020 16:17:06 -0500 Subject: Fix dumb mistake --- P1/src/mapreduce.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'P1') diff --git a/P1/src/mapreduce.c b/P1/src/mapreduce.c index ed1f9e5..2f6a0fb 100644 --- a/P1/src/mapreduce.c +++ b/P1/src/mapreduce.c @@ -29,8 +29,9 @@ int main(int argc, char *argv[]) { pid_t mapperPid; for (int i = 0; i < nMappers; i++) { mapperPid = fork(); - if (mapperPid != 0) { - //TODO: exec here + if (mapperPid > 0) { + //TODO: exec here + } } @@ -55,7 +56,7 @@ int main(int argc, char *argv[]) { pid_t reducerPid; for (int i = 0; i < nReducers; i++) { reducerPid = fork(); - if (reducerPid != 0) { + if (reducerPid > 0) { //TODO: exec here } } -- cgit v1.2.3