common: interrupt thread progress before printing error

Still racy, but better than printing on the same line as the progress
indicator line...

Signed-off-by: Kevin Shanahan <kmshanah@disenchant.net>
This commit is contained in:
Kevin Shanahan 2013-04-19 15:00:14 +09:30
parent 4275149cee
commit 207f5c6386
1 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@
#include <common/cmdlib.h>
#include <common/log.h>
#include <common/threads.h>
#include <sys/types.h>
#include <sys/stat.h>
@ -59,7 +60,8 @@ Error(const char *error, ...)
{
va_list argptr;
/* Use the lockless version so we can error out while holding the lock */
/* Using lockless prints so we can error out while holding the lock */
InterruptThreadProgress__();
logprint_locked__("************ ERROR ************\n");
va_start(argptr, error);