NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/59498: Add missing POSIX O_CLOFORK flag
The following reply was made to PR kern/59498; it has been noted by GNATS.
From: Christos Zoulas <christos%zoulas.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/59498: Add missing POSIX O_CLOFORK flag
Date: Tue, 01 Jul 2025 14:25:38 -0400
In addition to kre@'s comments about reviewing fcntl(F_GETFD),
I would add a fd_set_fdflags_from_oflags() that does:
fd_set_fdflags(curlwp, newfd,
((flags & O_CLOEXEC) ? FD_CLOEXEC : 0) |
((flags & O_CLOFORK) ? FD_CLOFORK : 0));
since this is repeated a bunch of times.
christos
Home |
Main Index |
Thread Index |
Old Index