mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 08:36:30 +00:00
reopening stdin and stdout to /dev/null now
stdin, stdout and stderr should always be valid file handles. Thus we don't close them but reopen them to /dev/null
This commit is contained in:
@@ -274,8 +274,8 @@ main(int argc, char **argv)
|
|||||||
terminate(ERR_BAD_CONFIG);
|
terminate(ERR_BAD_CONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(stdin);
|
freopen("/dev/null", "r", stdin);
|
||||||
fclose(stdout);
|
freopen("/dev/null", "w", stdout);
|
||||||
|
|
||||||
logger_init(&local_options, progname, local_options.loglevel, local_options.logfacility);
|
logger_init(&local_options, progname, local_options.loglevel, local_options.logfacility);
|
||||||
if (verbose)
|
if (verbose)
|
||||||
|
|||||||
Reference in New Issue
Block a user