pmap: Do not display error if shmctl(..IPC_RMID) returns EINVAL
The segment may have been destroyed by the kernel automagically after shmdt(addr) How to reproduce: sysctl -w kernel.shm_rmid_forced=1 ./pmap 1 shared memory remove: Invalid argument [..]
This commit is contained in:
parent
99d71ad581
commit
7bf9457f71
2
pmap.c
2
pmap.c
@ -201,7 +201,7 @@ static void discover_shm_minor(void)
|
|||||||
perror(_("shared memory detach"));
|
perror(_("shared memory detach"));
|
||||||
|
|
||||||
out_destroy:
|
out_destroy:
|
||||||
if (shmctl(shmid, IPC_RMID, NULL))
|
if (shmctl(shmid, IPC_RMID, NULL) && errno != EINVAL)
|
||||||
perror(_("shared memory remove"));
|
perror(_("shared memory remove"));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user