Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2023 00:45:50 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 06e36c8c7717 - stable/13 - posixshmcontrol(1): silently ignore inaccessible segments when listing
Message-ID:  <202304270045.33R0jouv025056@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=06e36c8c7717338558aa807db63c80f245bf533b

commit 06e36c8c7717338558aa807db63c80f245bf533b
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-04-23 23:30:58 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2023-04-27 00:45:02 +0000

    posixshmcontrol(1): silently ignore inaccessible segments when listing
    
    PR:     271038
    
    (cherry picked from commit 043e24bdb01938c0d5a73a3192e316ce0b96ec1b)
---
 usr.bin/posixshmcontrol/posixshmcontrol.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/usr.bin/posixshmcontrol/posixshmcontrol.c b/usr.bin/posixshmcontrol/posixshmcontrol.c
index 3b9d1dc256c3..5bb8aa473502 100644
--- a/usr.bin/posixshmcontrol/posixshmcontrol.c
+++ b/usr.bin/posixshmcontrol/posixshmcontrol.c
@@ -308,8 +308,10 @@ list_shm(int argc, char **argv)
 			continue;
 		fd = shm_open(kif->kf_path, O_RDONLY, 0);
 		if (fd == -1) {
-			warn("open %s", kif->kf_path);
-			ret = 1;
+			if (errno != EACCES) {
+				warn("open %s", kif->kf_path);
+				ret = 1;
+			}
 			continue;
 		}
 		error = fstat(fd, &st);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304270045.33R0jouv025056>