]> Pileus Git - ~andy/fetchmail/commitdiff
Check for logfile existence.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 17 Jan 2000 03:04:48 +0000 (03:04 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 17 Jan 2000 03:04:48 +0000 (03:04 -0000)
svn path=/trunk/; revision=2714

fetchmail.c

index d03a2b0eaa0b7d087edd0f6a1d322477a9c8df3c..0fab29a312bb9423ff42e88334ad6b418ee23f67 100644 (file)
@@ -553,7 +553,7 @@ int main(int argc, char **argv)
        if (run.poll_interval && !getuid())
            signal(SIGHUP, SIG_IGN);
     }
-    else if (run.logfile)
+    else if (run.logfile && access(run.logfile, F_OK) == 0)
     {
        freopen(run.logfile, "a", stdout);
        freopen(run.logfile, "a", stderr);