From 06f9b6c379db39fc7676df05d40b20c833b63632 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 5 Nov 2008 18:21:36 +0100 Subject: main: don't close all file descriptors on startup Removed closeAllFDs(). The caller is responsible for closing all file handles. --- src/main.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src') diff --git a/src/main.c b/src/main.c index 325254b62..79b17cda5 100644 --- a/src/main.c +++ b/src/main.c @@ -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); -- cgit v1.2.3