For some reason, my code only gets to the else if statement and does not go to the "printf("END OF LOOP \n");" Does anyone know why this might be?Code:if(count > 1){ //fork()
printf("START OF WHILE - %i \n", count);
int cid = fork();
count--;
printf("1st: %i \n", count);
if(cid == 0){ //Child process
printf("%i \n", cid);
execvp(cmdTokens[0], cmdTokens);
} else if(cid > 0){ //Parent process
waitpid(cid, 0, 0);
printf("%i \n", cid);
execvp(cmdTokens[0], cmdTokens);
}
printf("END OF LOOP \n");
printf("END OF WHILE - %i \n", count);
}

