diff --git a/src/progress.c b/src/progress.c index 61b635df..2c7bd0f9 100644 --- a/src/progress.c +++ b/src/progress.c @@ -1194,10 +1194,12 @@ create_image (struct bar_progress *bp, double dl_total_time, bool done) static void display_image (char *buf) { - bool old = log_set_save_context (false); - logputs (LOG_PROGRESS, "\r"); - logputs (LOG_PROGRESS, buf); - log_set_save_context (old); + if (tcgetpgrp (fileno (stderr)) == getpid ()) { + bool old = log_set_save_context (false); + logputs (LOG_PROGRESS, "\r"); + logputs (LOG_PROGRESS, buf); + log_set_save_context (old); + } } static void