pdrfork(2): do require RFPROCDESC | RFPROC when RFSPAWN is not specified, as stated in the man page. rfork(2) cannot modify non-curproc, which is why RFPROC is required, the syscall cannot act on arbitrary process descriptor. If RFPROCDESC is not specified, the syscall does not make sense, use rfork(2). Reported and tested by: pho pdfork.2: add EFAULT as possible error, explain some consequences of it pdrfork(2) tests: RFPROCDESC|RFPROC are required pdrfork(2) tests: do not rely on (int *)-1 being invalid address Explicitly mmap guard and use it as the invalid address instead. pdrfork(2) tests: catch runaway child for EFAULT test pdrfork(2) tests: split basic_usage into pdrfork(2) call itself, and basic_usage_tail() that checks the pdrfork(2) results. pdrfork(2) tests: should wait for the child to exit pdrfork(2) tests: enable on x86 Use pfrfork_thread(3) instead of pdrfork(RFSPAWN) to make tests working on x86.
Details
Details
- Reviewers
asomers markj emaste - Commits
- rG793e891f4ad1: pdrfork(2) tests: enable on x86
rGf90ee665d035: pdrfork(2) tests: should wait for the child to exit
rG94e4de77dec8: pdrfork(2) tests: split basic_usage
rG44843695bc4e: pdrfork(2) tests: catch runaway child for EFAULT test
rGd6bf2d14a941: pdrfork(2) tests: do not rely on (int *)-1 being invalid address
rG68ba270f4fc7: pdrfork(2) tests: RFPROCDESC|RFPROC are required
rGdb80ea9b8862: pdfork.2: add EFAULT as possible error, explain some consequences of it
rGb05be03ceea0: pdrfork(2): do require RFPROCDESC | RFPROC
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable