aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--P1/src/mapreduce.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/P1/src/mapreduce.c b/P1/src/mapreduce.c
index 8243e17..d4e5f4e 100644
--- a/P1/src/mapreduce.c
+++ b/P1/src/mapreduce.c
@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {
if (mapperPid == 0) {
char numMap[10];
sprintf(numMap, "%d", i);
- execl("./mapper", "./mapper", &numMap, NULL);
+ execl("./mapper", "./mapper", numMap, NULL);
printf("Mapper execution failed! Make sure \"mapper\" exists in the directory.\n");
return 2;
} else if (mapperPid == -1) {
@@ -76,7 +76,7 @@ int main(int argc, char *argv[]) {
if (reducerPid == 0) {
char numRed[10];
sprintf(numRed, "%d", i);
- execl("./reducer", "./reducer", &numRed, NULL);
+ execl("./reducer", "./reducer", numRed, NULL);
printf("Reducer execution failed! Make sure \"reducer\" exists in the directory.\n");
return 2;
} else if (reducerPid == -1) {