From: Theo Buehler Subject: Re: [PATCH]: Add POSIX O_CLOFORK flag To: "Todd C. Miller" Cc: guenther@openbsd.org, tech@openbsd.org Date: Thu, 11 Dec 2025 19:37:51 +0100 On Thu, Dec 11, 2025 at 11:23:30AM -0700, Todd C. Miller wrote: > On Thu, 11 Dec 2025 13:29:59 +0100, Theo Buehler wrote: > > > Found this piece of this submission in one of my trees. Do we want this > > or was that omitted deliberately? > > I think we do want the fstat.c change, but it needs a man page > addition as well. thanks. like this? Index: fstat.1 =================================================================== RCS file: /cvs/src/usr.bin/fstat/fstat.1,v diff -u -p -r1.59 fstat.1 --- fstat.1 31 Mar 2019 06:40:26 -0000 1.59 +++ fstat.1 11 Dec 2025 18:37:06 -0000 @@ -175,6 +175,8 @@ Open for reading Open for writing .It e close-on-exec flag is set +.It f +close-on-fork flag is set .It p Opened after .Xr pledge 2 Index: fstat.c =================================================================== RCS file: /cvs/src/usr.bin/fstat/fstat.c,v diff -u -p -r1.103 fstat.c --- fstat.c 20 Jun 2022 01:39:44 -0000 1.103 +++ fstat.c 11 Dec 2025 18:36:17 -0000 @@ -482,6 +482,8 @@ vtrans(struct kinfo_file *kf) strlcat(rwep, "w", sizeof rwep); if (kf->fd_ofileflags & UF_EXCLOSE) strlcat(rwep, "e", sizeof rwep); + if (kf->fd_ofileflags & UF_FORKCLOSE) + strlcat(rwep, "f", sizeof rwep); if (kf->fd_ofileflags & UF_PLEDGED) strlcat(rwep, "p", sizeof rwep); printf(" %4s", rwep);