fix: also close stderr when using syslog logging

This commit is contained in:
Christian Kruse
2014-01-17 12:14:26 +01:00
parent ee9dc9e247
commit a7d3c9b93a

View File

@@ -281,6 +281,11 @@ main(int argc, char **argv)
if (verbose)
logger_min_verbose(LOG_INFO);
if (log_type == REPMGR_SYSLOG)
{
fclose(stderr);
}
snprintf(repmgr_schema, MAXLEN, "%s%s", DEFAULT_REPMGR_SCHEMA_PREFIX, local_options.cluster_name);
log_info(_("%s Connecting to database '%s'\n"), progname, local_options.conninfo);