X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/9175a8d2ac50382af2045b37e7b054180f91f4e8..e94526c53d4b81b4040ba60a0341684697af17e4:/src/exim_monitor/em_main.c diff --git a/src/exim_monitor/em_main.c b/src/exim_monitor/em_main.c index e8e763184..3034a041c 100644 --- a/src/exim_monitor/em_main.c +++ b/src/exim_monitor/em_main.c @@ -2,7 +2,7 @@ * Exim Monitor * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2012 */ +/* Copyright (c) University of Cambridge 1995 - 2016 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -669,8 +669,14 @@ if (log_file[0] != 0) { fseek(LOG, 0, SEEK_END); log_position = ftell(LOG); - fstat(fileno(LOG), &statdata); - log_inode = statdata.st_ino; + if (fstat(fileno(LOG), &statdata)) + { + perror("log file fstat"); + fclose(LOG); + LOG=NULL; + } + else + log_inode = statdata.st_ino; } } else