From 14867980d0cb19b05997d88611d9b50b2675363c Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 2 Jul 2002 09:05:05 +0000 Subject: openlog could deadlock when called from vsyslog, so allow recursive locking, -Erik --- libc/misc/syslog/syslog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/misc/syslog/syslog.c b/libc/misc/syslog/syslog.c index 6cfe714ce..79535a5ba 100644 --- a/libc/misc/syslog/syslog.c +++ b/libc/misc/syslog/syslog.c @@ -82,7 +82,7 @@ #ifdef __UCLIBC_HAS_THREADS__ #include -static pthread_mutex_t mylock = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t mylock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; # define LOCK pthread_mutex_lock(&mylock) # define UNLOCK pthread_mutex_unlock(&mylock); #else -- cgit v1.2.3