shm: Change permissions on old shm areas too

Change the permissions on old shm areas
This commit is contained in:
Olivier Crête 2010-10-20 22:14:09 +02:00
parent 0b99919c55
commit de9905db03

View file

@ -396,8 +396,14 @@ sp_close (ShmPipe * self)
int
sp_writer_setperms_shm (ShmPipe * self, mode_t perms)
{
int ret = 0;
ShmArea *area;
self->perms = perms;
return fchmod (self->shm_area->shm_fd, perms);
for (area = self->shm_area; area; area = area->next)
ret |= fchmod (area->shm_fd, perms);
return ret;
}
static int