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

This commit is contained in:
Wang Yuan 2020-08-09 03:03:56 +08:00 committed by GitHub
parent 3f67b03378
commit ea7eeb2fd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
}
}