- read_mode = S_IRUSR | S_IRGRP;
- if (sock_info->global)
- read_mode |= S_IROTH;
-
- /*
- * Try to open read-only. If it is set read-only, it
- * means the shm size has been already set with
- * ftruncate. Note: all processes creating shm need to
- * call ftruncate on the shm before restricting its
- * access rights to read-only. The shm should never be
- * unlinked. It a rogue process try to create a non-accessible
- * shm or to unlink it, the worse-case scenario is that we don't
- * use the shm wakeup method and sleep/retry instead.
- */
- wait_shm_fd = shm_open(sock_info->wait_shm_path,
- O_RDONLY, read_mode);