- * At this point, we should be able to open it for
- * reading. If it fails, then it's because there is
- * something wrong: bail out in that case.
- */
- 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.