|
|
Log in / Subscribe / Register

posix_spawn() does avoid the copy-on-write, at least sometimes

posix_spawn() does avoid the copy-on-write, at least sometimes

Posted Jun 9, 2026 1:37 UTC (Tue) by sionescu (subscriber, #59410)
In reply to: posix_spawn() does avoid the copy-on-write, at least sometimes by smcv
Parent article: Moving beyond fork() + exec()

> for example you can posix_spawn_file_actions_addclose() to close individual fds, but you can't do the equivalent of close_range()

I wrote a clone of posix_spawn with some extra extensions, like specifying which FDs to keep, and close all the remaining ones: https://github.com/sionescu/libfixposix/blob/master/src/i...


to post comments


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds