Page MenuHomeFreeBSD

Add posix_spawnattr_get/setexecfd_np(3)
ClosedPublic

Authored by kib on Jan 24 2026, 10:24 PM.
Tags
None
Referenced Files
F151518580: D54862.id170355.diff
Wed, Apr 8, 11:44 PM
F151518200: D54862.id170355.diff
Wed, Apr 8, 11:40 PM
Unknown Object (File)
Wed, Apr 8, 4:47 AM
Unknown Object (File)
Sun, Apr 5, 9:27 AM
Unknown Object (File)
Sun, Apr 5, 8:46 AM
Unknown Object (File)
Wed, Mar 18, 11:18 AM
Unknown Object (File)
Wed, Mar 18, 7:15 AM
Unknown Object (File)
Sun, Mar 15, 4:42 AM
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