]> sourceware.org Git - newlib-cygwin.git/commitdiff
* bsd_helper.cc (tunable_params): Add kern.ipc.shm_allow_removed as
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 5 Nov 2007 15:45:52 +0000 (15:45 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 5 Nov 2007 15:45:52 +0000 (15:45 +0000)
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.

winsup/cygserver/ChangeLog
winsup/cygserver/bsd_helper.cc
winsup/cygserver/cygserver.conf
winsup/cygserver/sysv_shm.cc

index f52d1569a3207904e5be63c44e11fa577b8e5e7f..1aea84407df679828078c09d918336b5a5b8bb8a 100644 (file)
@@ -1,3 +1,12 @@
+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.
index f88398ea19f03f40f25c047b3a18f537da9062be..9c6b191c15c0fd36f32ab5bf2cda155e52a57288 100644 (file)
@@ -582,6 +582,7 @@ static tun_struct tunable_params[] =
   //{ "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}
 };
index c224c0e4c93c9059bea3c61e417ad22ae27f3e43..589931b110c83839840e4bfbfc8cec12984d33bd 100644 (file)
 # 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
index 88ddae0339afbe6bd9e99d600556b95101b6e2a4..700dbe21d1c82d1e7d0dd046784e1d7d41e036cc 100644 (file)
@@ -952,6 +952,7 @@ void
 shminit(void)
 {
        int i;
+       tun_bool_t shm_ar;
 
        TUNABLE_INT_FETCH("kern.ipc.shmmaxpgs", &shminfo.shmall);
        for (i = PAGE_SIZE; i > 0; i--) {
@@ -962,8 +963,9 @@ shminit(void)
        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)
This page took 0.034329 seconds and 5 git commands to generate.