char config_filename_canon[PATH_MAX];
if (realpath(argv[0], argv0_canon) == NULL) {
- log_perror("realpath");
+ log_perror(argv[0]);
exit(1);
}
if (realpath(config_filename.c_str(), config_filename_canon) == NULL) {
- log_perror("realpath");
+ log_perror(config_filename.c_str());
exit(1);
}
}
// OK, so the signal was SIGHUP. Check that the new config is okay, then exec the new binary.
- if (!dry_run_config(argv[0], config_filename)) {
+ if (!dry_run_config(argv0_canon, config_filename_canon)) {
open_logs(config.log_destinations);
log(ERROR, "%s --test-config failed. Restarting old version instead of new.", argv[0]);
hupped = false;