diff --git a/usr.bin/fstat/fstat.1 b/usr.bin/fstat/fstat.1 index f0c55598b1f..53b9b44acd4 100644 --- a/usr.bin/fstat/fstat.1 +++ b/usr.bin/fstat/fstat.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fstat.1,v 1.59 2019/03/31 06:40:26 jmc Exp $ +.\" $OpenBSD: fstat.1,v 1.60 2025/12/12 06:33:18 tb Exp $ .\" .\" Copyright (c) 1987, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)fstat.1 8.3 (Berkeley) 2/25/94 .\" -.Dd $Mdocdate: March 31 2019 $ +.Dd $Mdocdate: December 12 2025 $ .Dt FSTAT 1 .Os .Sh NAME @@ -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 diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index a74d3a6e916..bbafef0e084 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fstat.c,v 1.103 2022/06/20 01:39:44 visa Exp $ */ +/* $OpenBSD: fstat.c,v 1.104 2025/12/12 06:33:18 tb Exp $ */ /* * Copyright (c) 2009 Todd C. Miller @@ -337,10 +337,10 @@ fstat_header(void) { if (nflg) printf("%s", -"USER CMD PID FD DEV INUM MODE R/W SZ|DV"); +"USER CMD PID FD DEV INUM MODE R/W SZ|DV"); else printf("%s", -"USER CMD PID FD MOUNT INUM MODE R/W SZ|DV"); +"USER CMD PID FD MOUNT INUM MODE R/W SZ|DV"); if (oflg) printf("%s", ":OFFSET "); if (checkfile && fsflg == 0) @@ -427,7 +427,7 @@ void vtrans(struct kinfo_file *kf) { const char *badtype = NULL; - char rwep[5], mode[12]; + char rwep[6], mode[12]; char *filename = NULL; if (kf->v_type == VNON) @@ -482,9 +482,11 @@ 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); + printf(" %5s", rwep); switch (kf->v_type) { case VBLK: case VCHR: {