Started writing function to terminate all child processes.