| 174 |
p_line_offsets = p_data + data_len + 1; |
p_line_offsets = p_data + data_len + 1; |
| 175 |
memcpy(p_line_offsets, line_offsets, sizeof(long) * (size_t)(line_total + 1)); |
memcpy(p_line_offsets, line_offsets, sizeof(long) * (size_t)(line_total + 1)); |
| 176 |
|
|
| 177 |
// Re-mount shm in read-only mode |
// Remap shared memory in read-only mode |
| 178 |
if (shmdt(p_shm) == -1) |
p_shm = shmat(shmid, p_shm, SHM_RDONLY | SHM_REMAP); |
|
{ |
|
|
log_error("shmdt() error (%d)\n", errno); |
|
|
return -3; |
|
|
} |
|
|
|
|
|
p_shm = shmat(shmid, NULL, SHM_RDONLY); |
|
| 179 |
if (p_shm == (void *)-1) |
if (p_shm == (void *)-1) |
| 180 |
{ |
{ |
| 181 |
log_error("shmat(shmid=%d) error (%d)\n", shmid, errno); |
log_error("shmat(shmid=%d) error (%d)\n", shmid, errno); |