Permalink
Browse files

Fix the potential deadlock in starting logging

Seems the real issue is that I'd locked the queue around the new statement,
which is unnecessary, and causes the use of the queue mutex in the LOG() to
gack.
  • Loading branch information...
Beirdo committed Jul 2, 2012
1 parent 6b444ad commit dda4a4fa747b8323ba677f876dd75ea619073035
Showing with 2 additions and 3 deletions.
  1. +2 −3 mythtv/libs/libmythbase/logging.cpp
@@ -261,8 +261,8 @@ LoggerThread::LoggerThread(QString filename, bool progress, bool quiet,
char *debug = getenv("VERBOSE_THREADS");
if (debug != NULL)
{
// LOG(VB_GENERAL, LOG_NOTICE,
// "Logging thread registration/deregistration enabled!");
LOG(VB_GENERAL, LOG_NOTICE,
"Logging thread registration/deregistration enabled!");
debugRegistration = true;
}
m_locallogs = (m_appname == MYTH_APPNAME_MYTHLOGSERVER);
@@ -850,7 +850,6 @@ void logStart(QString logfile, int progress, int quiet, int facility,
QString table = dblog ? QString("logging") : QString("");
QMutexLocker qLock(&logQueueMutex);
if (!logThread)
logThread = new LoggerThread(logfile, progress, quiet, table, facility);

0 comments on commit dda4a4f

Please sign in to comment.