diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2023-04-23 23:30:58 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2023-04-23 23:38:48 +0000 |
commit | 043e24bdb01938c0d5a73a3192e316ce0b96ec1b (patch) | |
tree | 17c7c4e601b03e524d4565412cc3ae53c7f309c5 | |
parent | e51be73a60d21b766662b6951660090154063c4b (diff) | |
download | src-043e24bdb01938c0d5a73a3192e316ce0b96ec1b.tar.gz src-043e24bdb01938c0d5a73a3192e316ce0b96ec1b.zip |
posixshmcontrol(1): silently ignore inaccessible segments when listing
PR: 271038
Reported by: rau8344@gmail.com
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
-rw-r--r-- | usr.bin/posixshmcontrol/posixshmcontrol.c | 6 |
1 files 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); |