Page MenuHomeFreeBSD

Add posix_spawnattr_get/setexecfd_np(3)
ClosedPublic

Authored by kib on Jan 24 2026, 10:24 PM.
Tags
None
Referenced Files
F148523868: D54862.id170355.diff
Wed, Mar 18, 11:18 AM
F148501715: D54862.id170359.diff
Wed, Mar 18, 7:15 AM
Unknown Object (File)
Sun, Mar 15, 4:42 AM
Unknown Object (File)
Sat, Mar 14, 6:13 PM
Unknown Object (File)
Fri, Mar 13, 11:43 PM
Unknown Object (File)
Thu, Mar 12, 5:35 AM
Unknown Object (File)
Thu, Mar 12, 5:29 AM
Unknown Object (File)
Sun, Mar 1, 5:01 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Jan 24 2026, 10:24 PM

Some fixes, mostly to the man page typos.
Also accept that spawnattrs might be NULL.

lib/libc/gen/posix_spawnattr_getexecfd_np.3
14 ↗(On Diff #170359)

posix_spawn.3 should xref this page in the SEE ALSO section.

46 ↗(On Diff #170359)
47 ↗(On Diff #170359)
48 ↗(On Diff #170359)

What's wrong with having O_CLOEXEC set? Doesn't fexecve() work in this case? I didn't test it, but I see that do_execve() acquires a ref on the textvp before calling fdcloseexec().

Certainly O_CLOFORK must not be set.

52 ↗(On Diff #170359)
85 ↗(On Diff #170359)
kib marked 6 inline comments as done.Jan 25 2026, 4:18 PM
kib added inline comments.
lib/libc/gen/posix_spawnattr_getexecfd_np.3
48 ↗(On Diff #170359)

Of course it is CLOFORK. My bad, I had some discussion about some patch with the CLOFORK author simultaneously and it obviously get mixed.

kib marked an inline comment as done.

Man page fixes

This revision is now accepted and ready to land.Jan 25 2026, 5:16 PM