Pass the process state into the pid iterator funs