Print error info if failed opening config file (#6943)

(cherry picked from commit ea7eeb2fd2e7a73d951f394d5d14a5ba5a75d4b2)
This commit is contained in:
Wang Yuan 2020-08-09 03:03:56 +08:00 committed by Oran Agra
parent 0e581e0044
commit 9fd0c027e7

View File

@ -556,7 +556,8 @@ void loadServerConfig(char *filename, char *options) {
} else {
if ((fp = fopen(filename,"r")) == NULL) {
serverLog(LL_WARNING,
"Fatal error, can't open config file '%s'", filename);
"Fatal error, can't open config file '%s': %s",
filename, strerror(errno));
exit(1);
}
}