main: don't close all file descriptors on startup

Removed closeAllFDs().  The caller is responsible for closing all file
handles.
This commit is contained in:
Max Kellermann 2008-11-05 18:21:36 +01:00
parent 5d6e96e986
commit 06f9b6c379

View File

@ -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);