totaldone_str, totalsize_str, percent,
tablespacenum, tablespacecount);
- fprintf(stderr, "\r");
+ if (isatty(fileno(stderr)))
+ fprintf(stderr, "\r");
+ else
+ fprintf(stderr, "\n");
}
static int32
progname);
if (showprogress && !verbose)
- fprintf(stderr, "waiting for checkpoint\r");
+ {
+ fprintf(stderr, "waiting for checkpoint");
+ if (isatty(fileno(stderr)))
+ fprintf(stderr, "\r");
+ else
+ fprintf(stderr, "\n");
+ }
basebkp =
psprintf("BASE_BACKUP LABEL '%s' %s %s %s %s %s %s",
if (showprogress)
{
progress_report(PQntuples(res), NULL, true);
- fprintf(stderr, "\n"); /* Need to move to next line */
+ if (isatty(fileno(stderr)))
+ fprintf(stderr, "\n"); /* Need to move to next line */
}
PQclear(res);