summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-07-02 22:23:56 +0000
committerJeremy Allison <jra@samba.org>1998-07-02 22:23:56 +0000
commit6491a956ef0b6a54b28887521f75e2f54f18a6d2 (patch)
treeba8a505d9424474dc08f05075e3a766282f63df8 /source3/locking
parent3daefed54e221b397f1eff43d2a83a61c4500fb1 (diff)
downloadsamba-6491a956ef0b6a54b28887521f75e2f54f18a6d2.tar.gz
samba-6491a956ef0b6a54b28887521f75e2f54f18a6d2.tar.bz2
samba-6491a956ef0b6a54b28887521f75e2f54f18a6d2.zip
nttrans.c: More NT SMB stuff.
shmem_sysv.c: Fix for shared memory problems on several systems, Second and subsequent use of shmget should use zero as the size. Fix from Veselin Terzic <vterzic@systems.DHL.COM> Jeremy. (This used to be commit 1cd94b24592ca31ffae671acfd83b0d42b212cab)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/shmem_sysv.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/locking/shmem_sysv.c b/source3/locking/shmem_sysv.c
index 439d89c6e0..3466930f4c 100644
--- a/source3/locking/shmem_sysv.c
+++ b/source3/locking/shmem_sysv.c
@@ -641,8 +641,15 @@ struct shmem_ops *sysv_shm_open(int ronly)
}
}
- /* try to use an existing key */
- shm_id = shmget(SHMEM_KEY, shm_size, 0);
+ /*
+ * Try to use an existing key. Note that
+ * in order to use an existing key successfully
+ * size must be zero else shmget returns EINVAL.
+ * Thanks to Veselin Terzic <vterzic@systems.DHL.COM>
+ * for pointing this out.
+ */
+
+ shm_id = shmget(SHMEM_KEY, 0, 0);
/* if that failed then create one */
if (shm_id == -1) {