summaryrefslogtreecommitdiff
path: root/source3/locking/shmem_sysv.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-08-15 01:19:26 +0000
committerJeremy Allison <jra@samba.org>1998-08-15 01:19:26 +0000
commite13aeea928dd89373cfaf3916c96f853c1227884 (patch)
tree73b9506b9736b1e6a3a4117d6c54223250ea7d66 /source3/locking/shmem_sysv.c
parentb9623ab59e813131b1ed3f51616a46e719d59c21 (diff)
downloadsamba-e13aeea928dd89373cfaf3916c96f853c1227884.tar.gz
samba-e13aeea928dd89373cfaf3916c96f853c1227884.tar.bz2
samba-e13aeea928dd89373cfaf3916c96f853c1227884.zip
configure: Changes for extra headers.
configure.in: Source for header changes. client/clitar.c: Fixed isXXX macros & debugs for gcc pedantic compile. include/config.h.in: Added MEMSET, BZERO, MEMORY, RPCSVC_YPCLNT, STRINGS headers. include/includes.h: Headers for the above. include/smb.h: Made SIGNAL_CAST POSIX by default void (*)(int). lib/access.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/charset.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/debug.c: Fixed signal functs. lib/kanji.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/smbrun.c: Fixed isXXX macros & debugs for gcc pedantic compile. lib/util.c: Fixed isXXX macros & debugs for gcc pedantic compile. libsmb/namequery.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem.c: Fixed isXXX macros & debugs for gcc pedantic compile. locking/shmem_sysv.c: Fixed error messages in sysV stuff. nmbd/asyncdns.c: Fixed signal functs. nmbd/nmbd.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/passdb.c: Fixed isXXX macros & debugs for gcc pedantic compile. passdb/smbpassfile.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/chgpasswd.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/ipc.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/nttrans.c: Fixed fsp code path. smbd/password.c: fixed HAVE_YP_GET_DEFAULT_DOMAIN problem. smbd/printing.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/reply.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/server.c: Fixed isXXX macros & debugs for gcc pedantic compile. smbd/trans2.c: Fixed core dump bug. smbd/uid.c: Fixed isXXX macros & debugs for gcc pedantic compile. Jeremy. (This used to be commit 1b9cbcd02e575dc0a95fa589f720df30a4acc46b)
Diffstat (limited to 'source3/locking/shmem_sysv.c')
-rw-r--r--source3/locking/shmem_sysv.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/locking/shmem_sysv.c b/source3/locking/shmem_sysv.c
index b8b9c2cb45..192ed32344 100644
--- a/source3/locking/shmem_sysv.c
+++ b/source3/locking/shmem_sysv.c
@@ -564,8 +564,9 @@ struct shmem_ops *sysv_shm_open(int ronly)
}
if (sem_id == -1) {
- DEBUG(0,("Can't create or use semaphore %s\n",
+ DEBUG(0,("Can't create or use semaphore [1]. Error was %s\n",
strerror(errno)));
+ return NULL;
}
if (sem_id != -1) {
@@ -574,6 +575,7 @@ struct shmem_ops *sysv_shm_open(int ronly)
if (semctl(sem_id, i, SETVAL, su) != 0) {
DEBUG(1,("Failed to init semaphore %d. Error was %s\n",
i, strerror(errno)));
+ return NULL;
}
}
}
@@ -582,7 +584,7 @@ struct shmem_ops *sysv_shm_open(int ronly)
sem_id = semget(SEMAPHORE_KEY, 0, 0);
}
if (sem_id == -1) {
- DEBUG(0,("Can't create or use semaphore.Error was %s\n",
+ DEBUG(0,("Can't create or use semaphore [2]. Error was %s\n",
strerror(errno)));
return NULL;
}
@@ -609,6 +611,7 @@ struct shmem_ops *sysv_shm_open(int ronly)
if (semctl(sem_id, 0, SETVAL, su) != 0) {
DEBUG(0,("ERROR: Failed to clear global lock. Error was %s\n",
strerror(errno)));
+ return NULL;
}
}
@@ -616,6 +619,7 @@ struct shmem_ops *sysv_shm_open(int ronly)
if (semctl(sem_id, 0, IPC_SET, su) != 0) {
DEBUG(0,("ERROR shmctl : can't IPC_SET. Error was %s\n",
strerror(errno)));
+ return NULL;
}
}
@@ -632,6 +636,8 @@ struct shmem_ops *sysv_shm_open(int ronly)
if (semctl(sem_id, i, SETVAL, su) != 0) {
DEBUG(0,("ERROR: Failed to clear IPC lock %d. Error was %s\n",
i, strerror(errno)));
+ global_unlock();
+ return NULL;
}
}
}
@@ -679,6 +685,8 @@ struct shmem_ops *sysv_shm_open(int ronly)
mapping processes */
if (shmctl(shm_id, IPC_STAT, &shm_ds) != 0) {
DEBUG(0,("ERROR shmctl : can't IPC_STAT. Error was %s\n", strerror(errno)));
+ global_unlock();
+ return NULL;
}
if (!read_only) {