The function set the address where to store resulting procdesc, which also explcitly request posix_spawn() to use pdfork() (really pdrfork()) instead of fork, and create procdesc for the child.
Since it is needed, also add pdrfork_thread(3) on x86.
The documentation will come later after we agree on the API. I choose this since it allows to unify use of pdrfork, so consumers still use posix_spawn instead of some other function.
An illustration for use of the all new proposed API is there https://reviews.freebsd.org/P686. I used this program to debug the code.