]> Pileus Git - ~andy/fetchmail/commitdiff
Enable -L to work in foreground.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 17 Jan 2000 02:58:46 +0000 (02:58 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 17 Jan 2000 02:58:46 +0000 (02:58 -0000)
svn path=/trunk/; revision=2713

NEWS
driver.c
fetchmail.c

diff --git a/NEWS b/NEWS
index d149749c219fe5f3d131a7ac64bfd612b35ee769..5f5773e8c4f9eed11c22c9201415e2bd2d6c761d 100644 (file)
--- 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.
index 05d91b7343041205a4585bf491b2f1868ffb6cf3..655bf4d3cb1c7459553b4dbac248a5cfe79f4f7d 100644 (file)
--- 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);
+           }
        }
     }
 
index a758d5accc9b31ac1d220ee7d18cccb0827205af..d03a2b0eaa0b7d087edd0f6a1d322477a9c8df3c 100644 (file)
@@ -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();