X-Git-Url: https://git.exim.org/users/heiko/exim.git/blobdiff_plain/e91ad4a760cbf58e1f455d2ba226d80aa6c2da05..d8b8dd159b784810ec7e5d55e3c49319fc63598a:/src/exim_monitor/em_main.c?ds=inline 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