aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c
index 02de3e14..7e61f250 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -110,9 +110,11 @@ void progress_bar(int val, int total, const char *text)
for ( i=0; i<n; i++ ) s[i] = '=';
for ( i=n; i<width; i++ ) s[i] = '.';
s[width] = '\0';
- STATUS("\r%s: |%s|", text, s);
- if ( val == total ) STATUS("\n");
+ pthread_mutex_lock(&stderr_lock);
+ fprintf(stderr, "\r%s: |%s|", text, s);
+ if ( val == total ) fprintf(stderr, "\n");
+ pthread_mutex_unlock(&stderr_lock);
fflush(stdout);
}