bool parameter.
* cygserver.conf: Add a description for the kern.ipc.shm_allow_removed
parameter.
* sysv_shm.cc (shminit): Set shm_allow_removed variable according to
kern.ipc.shm_allow_removed setting.
+2007-11-05 Corinna Vinschen <corinna@vinschen.de>
+
+ * bsd_helper.cc (tunable_params): Add kern.ipc.shm_allow_removed as
+ bool parameter.
+ * cygserver.conf: Add a description for the kern.ipc.shm_allow_removed
+ parameter.
+ * sysv_shm.cc (shminit): Set shm_allow_removed variable according to
+ kern.ipc.shm_allow_removed setting.
+
2007-08-02 Corinna Vinschen <corinna@vinschen.de>
* smallprint.c: Remove.
//{ "kern.ipc.shmmin", TUN_INT, {0}, {1}, {32767}, default_tun_check},
{ "kern.ipc.shmmni", TUN_INT, {0}, {1}, {32767}, default_tun_check},
{ "kern.ipc.shmseg", TUN_INT, {0}, {1}, {32767}, default_tun_check},
+ { "kern.ipc.shm_allow_removed", TUN_BOOL, {TUN_UNDEF}, {TUN_FALSE}, {TUN_TRUE}, default_tun_check},
//{ "kern.ipc.shm_use_phys", TUN_INT, {0}, {1}, {32767}, default_tun_check},
{ NULL, TUN_NULL, {0}, {0}, {0}, NULL}
};
# kern.ipc.shmseg: Maximum number of shared memory segments per process.
# Default: 128, Min: 1, Max: 32767
#kern.ipc.shmseg 128
+
+# kern.ipc.shm_allow_removed: Determines whether a process is allowed to
+# attach to a shared memory segment (using the shmat call) after a successful
+# call to shmctl(IPC_RMID). This is a Linux-specific, and therefore
+# non-portable feature. Use with care. Default is "no".
+#kern.ipc.shm_allow_removed no
shminit(void)
{
int i;
+ tun_bool_t shm_ar;
TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall);
for (i = PAGE_SIZE; i > 0; i--) {
TUNABLE_INT_FETCH("kern.ipc.shmmin", &shminfo.shmmin);
TUNABLE_INT_FETCH("kern.ipc.shmmni", &shminfo.shmmni);
TUNABLE_INT_FETCH("kern.ipc.shmseg", &shminfo.shmseg);
- TUNABLE_INT_FETCH("kern.ipc.shm_use_phys", &shm_use_phys);
-
+ TUNABLE_BOOL_FETCH("kern.ipc.shm_allow_removed", &shm_ar);
+ if (shm_ar == TUN_TRUE)
+ shm_allow_removed = 1;
shmalloced = shminfo.shmmni;
shmsegs = (struct shmid_ds *) sys_malloc(shmalloced * sizeof(shmsegs[0]), M_SHM, M_WAITOK);
if (shmsegs == NULL)