The child exited immediately after pdfork(), so the parent's pdopenpid() could catch it mid-exit (P_WEXIT) and fail with EBUSY.
Block the child on a pipe until the parent has opened the second descriptor, then release it
Details
Details
Without this patch, I sometimes meet this error:
tests/sys/kern/procdesc.c:534: pdopenpid: Device busy
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable