fix(netbsd): add NetBSD support to daemon IPC and runtime - #1342
Conversation
|
Thank you for this — it is a careful, minimal port, and I want to tell you plainly where it stands rather than leaving it silent. The code review came back clean, and I checked the part that would worry me most. The The NetBSD peer-credential logic itself reads correctly — What is holding it is a policy question, not your code. Merging means the project claims NetBSD support, and we have no NetBSD CI leg — so this path would be contributor-verified only, indefinitely. That is a maintainer decision about which platforms we are willing to stand behind without automated coverage, and I have put it in front of him rather than deciding it myself. I would rather give you a real answer than a quiet merge that leaves you as the sole guarantor of a platform forever. Two things that would help whichever way it goes:
One practical heads-up: #1138 also edits the same Thanks for the patience, and for keeping the change as small as it is — that is a large part of why the review was straightforward. |
|
Decision on the BSD pair: FreeBSD (#1467) just merged, and we want NetBSD too — with one fix first. Your NetBSD branch reuses the Linux /proc//exe path, but NetBSD's procfs is an optional mount and 'exe' is its Linux-compat name, so on a default install the identity check would silently fail — the exact class of quiet breakage the daemon code avoids elsewhere. The native idiom would be sysctl KERN_PROC_PATHNAME (see how #1467 did FreeBSD, including the O_NOFOLLOW/fstat double-check). You'll also need a small rebase over #1467's guard renames (runtime_linux_stat_same_image → runtime_posix_stat_same_image). With those two, this merges — with the same honest-limits note FreeBSD carries: no NetBSD CI leg, community-verified path. Thank you for bringing the platform this far. |
Extend Linux/FreeBSD codepaths in runtime.c to also cover NetBSD, and add NetBSD-specific peer PID retrieval via LOCAL_PEEREID in ipc.c. Signed-off-by: Christof Meerwald <cmeerw@cmeerw.org>
f140939 to
24f6819
Compare
Extend Linux codepaths in runtime.c to also cover NetBSD, and add NetBSD-specific peer PID retrieval via LOCAL_PEEREID in ipc.c.