X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/9175a8d2ac50382af2045b37e7b054180f91f4e8..b9c4d138d95f568884a4919314cd312dd29e120c:/src/exim_monitor/em_main.c?ds=sidebyside 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