From d92ef173bc6ab7dd85bd2cbadbb2a089a9d4bacf Mon Sep 17 00:00:00 2001 From: Michael Meffie Date: Wed, 4 Feb 2015 12:19:32 -0500 Subject: [PATCH] util: always reopen the log file Reopen the log file even if the filename exists. This fixes the situation where an external program moves or deletes the log file, then creates a new file with the same log file name. Change-Id: I3b98d6fc0d05c7ab231f84e9a271f925506ab51f Reviewed-on: https://gerrit.openafs.org/11725 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- src/util/serverLog.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/util/serverLog.c b/src/util/serverLog.c index 8b6ea85..b42525b 100644 --- a/src/util/serverLog.c +++ b/src/util/serverLog.c @@ -465,9 +465,6 @@ ReOpenLog(const char *fileName) { int flags = O_WRONLY | O_APPEND | O_CREAT; - if (access(fileName, F_OK) == 0) - return 0; /* exists, no need to reopen. */ - #if !defined(AFS_NT40_ENV) if (serverLogSyslog) { return 0; -- 1.9.4