hastd(8) assumes it has no extra file descriptors opened

and aborts otherwise, so call closefrom() early.

PR:		227461
MFC after:	2 weeks
This commit is contained in:
Eugene Grosbein 2020-11-29 13:45:53 +00:00
parent b712e3e343
commit 1c86e81196

View File

@ -1222,6 +1222,7 @@ main(int argc, char *argv[])
pjdlog_init(PJDLOG_MODE_STD);
pjdlog_debug_set(debuglevel);
closefrom(MAX(MAX(STDIN_FILENO, STDOUT_FILENO), STDERR_FILENO) + 1);
g_gate_load();
/*