Functions

If there is not a child process whose pid is same as given, return -1. Else if there is a child process but it is still running, return -2.