libthr: wrap pdfork(2), same as fork(2).
(cherry picked from commit 21f749da82e755aafab127618affeffb86cff9a5)