On Mon, Jun 10, 2024 at 1:07 PM Robert Elz <k...@munnari.oz.au> wrote: > > The next POSIX will include O_CLOFORK and FD_CLOFORK (or names > similar to those) for open (etc) and fcntl(FDFLAGS)) - that is > analogs of O_CLOEXEC and FD_CLOEXEC but applying to fork() rather > than exec*().
Well there you go. Once people are satisfied with the extent to which O_CLOFORK and FD_CLOFORK are present in operating systems, the coproc keyword could simply apply that fd flag to the fds it creates. A builtin 'fdflags' or similar could then turn it off for those fds or on for any arbitrary fd. I'd be willing to wait for that. It seems like a really elegant solution. Zack