implemented waitpid and prcoess exit code