aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2000-01-17 02:58:46 +0000
committerEric S. Raymond <esr@thyrsus.com>2000-01-17 02:58:46 +0000
commit26d408b17903b7e06d2abd662d36445fea5f502c (patch)
tree0400e99005f1db451b62798dd610c4cb7fe0854f
parentf1fa3732087b628f3950c4624319257b02d4f8d7 (diff)
downloadfetchmail-26d408b17903b7e06d2abd662d36445fea5f502c.tar.gz
fetchmail-26d408b17903b7e06d2abd662d36445fea5f502c.tar.bz2
fetchmail-26d408b17903b7e06d2abd662d36445fea5f502c.zip
Enable -L to work in foreground.
svn path=/trunk/; revision=2713
-rw-r--r--NEWS1
-rw-r--r--driver.c5
-rw-r--r--fetchmail.c6
3 files changed, 11 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index d149749c..5f5773e8 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,7 @@ package will have two security verifications instead of one...
* Message-string macros eliminated from driver.c so gettext can see them.
* Various useful to version reporting & configure.in fixes by Chip Salzenberg.
* Bernhard Rosenkraenzer's fix for broken Kerberos V configuration.
+* Make --logfile work in foreground.
fetchmail-5.2.3 (Tue Jan 4 01:56:11 EST 2000), 18421 lines:
* Ken Estes's patch to check for unreachable UIDL file due to bad NFS mount.
diff --git a/driver.c b/driver.c
index 05d91b73..655bf4d3 100644
--- a/driver.c
+++ b/driver.c
@@ -1214,7 +1214,10 @@ static int readbody(int sock, struct query *ctl, flag forward, int len)
return(PS_IOERR);
}
else if (outlevel >= O_VERBOSE)
- fputc('*', stderr);
+ {
+ fputc('*', stdout);
+ fflush(stdout);
+ }
}
}
diff --git a/fetchmail.c b/fetchmail.c
index a758d5ac..d03a2b0e 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -553,6 +553,12 @@ int main(int argc, char **argv)
if (run.poll_interval && !getuid())
signal(SIGHUP, SIG_IGN);
}
+ else if (run.logfile)
+ {
+ freopen(run.logfile, "a", stdout);
+ freopen(run.logfile, "a", stderr);
+ }
+
#ifdef linux
interface_init();