Commit 06f9b6c3 authored by Max Kellermann's avatar Max Kellermann

main: don't close all file descriptors on startup

Removed closeAllFDs(). The caller is responsible for closing all file handles.
parent 5d6e96e9
......@@ -224,15 +224,6 @@ static void parseOptions(int argc, char **argv, Options * options)
exit(EXIT_FAILURE);
}
static void closeAllFDs(void)
{
int i;
int fds = getdtablesize();
for (i = 3; i < fds; i++)
close(i);
}
static void changeToUser(void)
{
ConfigParam *param = getConfigParam(CONF_USER);
......@@ -391,8 +382,6 @@ int main(int argc, char *argv[])
Options options;
clock_t start;
closeAllFDs();
initConf();
parseOptions(argc, argv, &options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment