aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fetchmail.c b/fetchmail.c
index c5b6f7cb..4c07dee6 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -487,8 +487,10 @@ int main(int argc, char **argv)
{
if (run.logfile && access(run.logfile, F_OK) == 0)
{
- freopen(run.logfile, "a", stdout);
- freopen(run.logfile, "a", stderr);
+ if (!freopen(run.logfile, "a", stdout))
+ report(stderr, GT_("could not open %s to append logs to \n"), run.logfile);
+ if (!freopen(run.logfile, "a", stderr))
+ report(stdout, GT_("could not open %s to append logs to \n"), run.logfile);
}
}