summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2021-02-05 11:50:17 +0100
committerAndreas Schneider <asn@samba.org>2021-02-05 14:11:31 +0100
commit92a4fce9df55e4c1a3b75325baa0f4b0988eeb6c (patch)
tree6ec96cef70db50efdcd9bfebf6e4e4279c6f3f8d
parentaffaf4248c0cc2056081f56199109e4a94348b82 (diff)
downloadsocket_wrapper-92a4fce9df55e4c1a3b75325baa0f4b0988eeb6c.tar.gz
socket_wrapper-92a4fce9df55e4c1a3b75325baa0f4b0988eeb6c.tar.xz
socket_wrapper-92a4fce9df55e4c1a3b75325baa0f4b0988eeb6c.zip
swrap: abort on mutex errors
There's no way to continue in a reliable way... Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
-rw-r--r--src/socket_wrapper.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index 0f37605..00db6f0 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -755,6 +755,7 @@ static void _swrap_mutex_lock(pthread_mutex_t *mutex, const char *name, const ch
if (ret != 0) {
SWRAP_LOG(SWRAP_LOG_ERROR, "PID(%d):PPID(%d): %s(%u): Couldn't lock pthread mutex(%s) - %s",
getpid(), getppid(), caller, line, name, strerror(ret));
+ abort();
}
}
@@ -767,6 +768,7 @@ static void _swrap_mutex_unlock(pthread_mutex_t *mutex, const char *name, const
if (ret != 0) {
SWRAP_LOG(SWRAP_LOG_ERROR, "PID(%d):PPID(%d): %s(%u): Couldn't unlock pthread mutex(%s) - %s",
getpid(), getppid(), caller, line, name, strerror(ret));
+ abort();
}
}