Download raw body.
[PATCH]: Add POSIX O_CLOFORK flag
Hello Ricardo, Ricardo Branco wrote on Sun, Jun 22, 2025 at 07:30:52PM +0200: > On 6/22/25 2:35 AM, Philip Guenther wrote: >> Rebased diff, with cleared-on-exec behavior, attached, in case you >> want to play with it, Richardo. >> Regress tests would be wonderful :) > I modified your code a bit and tested this patch with a minimal tweak > to the Illumos testsuite which contains hundreds of tests and it works! > If you're ok with it, I'll extend the current regression tests with > O_CLOEXEC to include O_CLOFORK. Absolutely not OK. OpenBSD cannot use your gist. As explained in my previous message, OpenBSD requires a free license, preferably https://cvsweb.openbsd.org/src/share/misc/license.template?rev=HEAD , but other free licenses like BSD, ISC or MIT are fine, too. Copyleft licenses like CDDL or GPL are useless for us, they are not free enough. That said, if all Copyright holders of your test suite would give explicit perimission to OpenBSD to redistribute the test suite under a free license, that might make it usable for us. > Didn't check the manpages. > I dunno how we should document the deviation from POSIX. That's easy. In those rare cases where we intentionally deviate from standards because we consider the behaviour required by the standard undesirable (usually for security reasons), we document the *actual* behaviour of our code below DESCRIPTION (exactly as if the broken standard would not exist), then say something like this below STANDARDS: This function conforms to the FOO standard except that the BAR feature does BAZ and does not do OOPS as the standard would require. Or something like that, depending on the particular case. The amount of detail depends on how much is useful to know for typical users. Yours, Ingo > I uploaded this gist to github containing the diff to the oclo tests: > https://gist.github.com/ricardobranco777/2d073c9f025eec6a87ce27bbbf60ac99 > > Apply to the C files from: > https://github.com/illumos/illumos-gate/tree/master/usr/src/test/os-tests/tests/oclo
[PATCH]: Add POSIX O_CLOFORK flag