fd: use PROC_WAIT_UNLOCKED when clearing p_fd/p_pd
(cherry picked from commit 9bfddb3ac4ce8a2fbd5bb212a263747343a931e7)