waitpid process groups
waitpid needs to support waiting for process groups. That's pretty trivial though to add, since we have them, we just need to check whether there exists any children matching the criteria. I wonder what happens if the intended child leaves the process group after we checked if such a child exists. That's not a problem with pids, but processes can enter process groups.