Re: Add missing POSIX O_CLOFORK

Ricardo Branco <[email protected]> Wed, 9 Jul 2025 23:09:20 +0200
Newsgroups gmane.os.dragonfly-bsd.kernel
Message-ID <[email protected]>

On 7/9/25 10:59 PM, Matthew Dillon wrote:
> Ok, it looks fairly straight-forward.   A great deal of work on your 
> part, we really appreciate it!
> The only question I have is about this line in fsetfdflags():
>
> fdp->fd_files[fd].fileflags = set_flags & 0x7f;
>
> What is the mask for?  fileflags is a char field more or less but if 
> all you are doing is getting rid of a compiler warning that should 
> probably be a cast instead of a masking operation, with a comment 
> explainer.
>
> -Matt
>

You're right.  With the cast it works. The tests pass.