pids: improve get_task_pid() to fix the unsafe sys_wait4()->task_pgrp()