pids: introduce change_pid() helper