diff --git a/src/ckpool.c b/src/ckpool.c index d3e71b4b..784a6a1f 100644 --- a/src/ckpool.c +++ b/src/ckpool.c @@ -57,7 +57,10 @@ static bool open_logfile(ckpool_t *ckp) * on any delays. */ static void console_log(ckpool_t __maybe_unused *ckp, char *msg) { - fprintf(stderr, "\33[2K\r%s", msg); + /* Add clear line only if stderr is going to console */ + if (isatty(fileno(stderr))) + fprintf(stderr, "\33[2K\r"); + fprintf(stderr, "%s", msg); fflush(stderr); free(msg);