aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-06-28 08:56:07 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-06-28 08:56:07 +0000
commit0ba9411d4fa6e17ef377ea7602dd35166229e8f7 (patch)
tree43185da1c47eaf43fdb90d6e1a06d46724b31b42 /driver.c
parenta810b6eba0f223a1ab5c2c279e8745f73496bf1b (diff)
downloadfetchmail-0ba9411d4fa6e17ef377ea7602dd35166229e8f7.tar.gz
fetchmail-0ba9411d4fa6e17ef377ea7602dd35166229e8f7.tar.bz2
fetchmail-0ba9411d4fa6e17ef377ea7602dd35166229e8f7.zip
Better file check for progress-to control.
svn path=/trunk/; revision=2909
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/driver.c b/driver.c
index 1e80c2b8..267b33c1 100644
--- a/driver.c
+++ b/driver.c
@@ -533,7 +533,7 @@ static int readheaders(int sock,
sizeticker += linelen;
while (sizeticker >= SIZETICKER)
{
- if (!run.use_syslog && isatty(1))
+ if (!run.use_syslog && !isafile(1))
{
fputc('.', stdout);
fflush(stdout);
@@ -1060,7 +1060,7 @@ static int readheaders(int sock,
free_str_list(&msgblk.recipients);
return(PS_IOERR);
}
- else if ((run.poll_interval == 0 || nodetach) && outlevel >= O_VERBOSE && isatty(2))
+ else if ((run.poll_interval == 0 || nodetach) && outlevel >= O_VERBOSE && !isafile(2))
fputs("#", stderr);
/* write error notifications */
@@ -1170,7 +1170,7 @@ static int readbody(int sock, struct query *ctl, flag forward, int len)
sizeticker += linelen;
while (sizeticker >= SIZETICKER)
{
- if ((run.poll_interval == 0 || nodetach) && outlevel > O_SILENT && isatty(1))
+ if ((run.poll_interval == 0 || nodetach) && outlevel > O_SILENT && !isafile(1))
{
fputc('.', stdout);
fflush(stdout);
@@ -1228,7 +1228,7 @@ static int readbody(int sock, struct query *ctl, flag forward, int len)
release_sink(ctl);
return(PS_IOERR);
}
- else if (outlevel >= O_VERBOSE && isatty(1))
+ else if (outlevel >= O_VERBOSE && !isafile(1))
{
fputc('*', stdout);
fflush(stdout);
@@ -2050,7 +2050,7 @@ const int maxfetch; /* maximum number of messages to fetch */
*/
if (protocol->fetch_body && !suppress_readbody)
{
- if (outlevel >= O_VERBOSE && isatty(1))
+ if (outlevel >= O_VERBOSE && !isafile(1))
{
fputc('\n', stdout);
fflush(stdout);
@@ -2104,7 +2104,7 @@ const int maxfetch; /* maximum number of messages to fetch */
/* tell server we got it OK and resynchronize */
if (protocol->trail)
{
- if (outlevel >= O_VERBOSE && isatty(1))
+ if (outlevel >= O_VERBOSE && !isafile(1))
{
fputc('\n', stdout);
fflush(stdout);