mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +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);
|
||||
}
|
||||
|
||||
fclose(stdin);
|
||||
fclose(stdout);
|
||||
freopen("/dev/null", "r", stdin);
|
||||
freopen("/dev/null", "w", stdout);
|
||||
|
||||
logger_init(&local_options, progname, local_options.loglevel, local_options.logfacility);
|
||||
if (verbose)
|
||||
|
||||
Reference in New Issue
Block a user