Make waitpid wait any process with the same pgid of the caller when setting zero to the pid argument.