From 92a4fce9df55e4c1a3b75325baa0f4b0988eeb6c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 5 Feb 2021 11:50:17 +0100 Subject: swrap: abort on mutex errors There's no way to continue in a reliable way... Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- src/socket_wrapper.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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(); } } -- cgit