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

Alan Somers <[email protected]> Wed, 7 Jan 2026 20:42:59 -0700
Newsgroups gmane.os.freebsd.architechture
Message-ID <CAOtMX2iBj73SRDCzubZ91w_uH3YcjJPHL4GFngCTzx4f=iv1VA__48705.0104582281$1767843814$gmane$org@mail.gmail.com>
On Wed, Jan 7, 2026 at 8:02 PM Rob Norris <[email protected]> wrote:
>
> On Thu, 8 Jan 2026, at 1:40 PM, Konstantin Belousov wrote:
>
> That's fair.  The bug report references discussion at
>  https://lists.cam.ac.uk/pipermail/cl-capsicum-discuss/2015-May/msg00012.html
> which seems to be no longer available.  Does anybody have a pointer
> to it?
>
>
> Looks like a change to the mailing list archive software. I guess this or something in the same thread.
>
> https://lists.cam.ac.uk/sympa/arc/cl-capsicum-discuss/2015-05/msg00012.html
>

Thanks for finding that!  There's two important pieces of information there:

* "we reserve the PID until all of its PDs had been closed".  If
that's true, then it's possible to use wait4 with process descriptors
race-free.  That would be good enough for my current purposes.  A
proper  pdwait4() would still be useful for capability-mode processes,
however.

* Ed Shouten already wrote a pdwait(3) on top of kqueue (though the
link is dead).  I might be able to use that.

I'll investigate both of the above points tomorrow.