posixshmcontrol(1): silently ignore inaccessible segments when listing
PR: 271038 Reported by: rau8344@gmail.com Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
e51be73a60
commit
043e24bdb0
@ -308,8 +308,10 @@ list_shm(int argc, char **argv)
|
|||||||
continue;
|
continue;
|
||||||
fd = shm_open(kif->kf_path, O_RDONLY, 0);
|
fd = shm_open(kif->kf_path, O_RDONLY, 0);
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
|
if (errno != EACCES) {
|
||||||
warn("open %s", kif->kf_path);
|
warn("open %s", kif->kf_path);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
error = fstat(fd, &st);
|
error = fstat(fd, &st);
|
||||||
|
Loading…
Reference in New Issue
Block a user