git: 043e24bdb019 - main - posixshmcontrol(1): silently ignore inaccessible segments when listing
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 23 Apr 2023 23:39:06 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=043e24bdb01938c0d5a73a3192e316ce0b96ec1b commit 043e24bdb01938c0d5a73a3192e316ce0b96ec1b Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2023-04-23 23:30:58 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2023-04-23 23:38:48 +0000 posixshmcontrol(1): silently ignore inaccessible segments when listing PR: 271038 Reported by: rau8344@gmail.com Sponsored by: The FreeBSD Foundation MFC after: 1 week --- 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);