Re: Is anybody working on extending procdesc support to rfork?

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Thu, 08 Jan 2026 02:22:27 UTC
On Wed, Jan 07, 2026 at 08:06:59AM -0700, Alan Somers wrote:
> /*
>  * pdrfork - a procdesc-enabled version of rfork, to support pd_spawn
>  * fdp is return storage for the process descriptor
>  * pdflags are as described in pdfork(2)
>  * rflags are as described in rfork(2)
>  */
> int pdrfork(int *fdp, int pdflags, int rflags);

I put together a naive (might be too naive) implementation for just that.
See https://reviews.freebsd.org/D54592, you are assigned as the reviewer.

I made the operation without RFPROC flag requiring the current process.

Would you wrote some tests to catch the expected behavior?