Added to fork, perror, and wait for hw 4

Will do at least one more later and fix any writing errors