]> granicus.if.org Git - pgbouncer/commitdiff
remove too paranoid fd cleanup
authorMarko Kreen <markokr@gmail.com>
Wed, 12 Sep 2007 09:32:49 +0000 (09:32 +0000)
committerMarko Kreen <markokr@gmail.com>
Wed, 12 Sep 2007 09:32:49 +0000 (09:32 +0000)
src/main.c
src/system.h

index 00b932a69878a8292318345e8fd4c886ed691a7f..cd00d1ba3891c64a0187c72d18ebafc16af03d2f 100644 (file)
@@ -330,10 +330,6 @@ static void go_daemon(void)
        /* dont log to stdout anymore */
        cf_quiet = 1;
 
-       /* just in case close all files */
-       for (fd = 3; fd < OPEN_MAX; fd++)
-               close(fd);
-
        /* send stdin, stdout, stderr to /dev/null */
        fd = open("/dev/null", O_RDWR);
        if (fd < 0)
index bd33a2304c5972bc31efa4a67fe291baf8c8219f..4e082c3128afed9573adcdad52b0b2efcd8b27a4 100644 (file)
 #define Assert(e)
 #endif
 
-#ifndef OPEN_MAX
-#define OPEN_MAX sysconf(_SC_OPEN_MAX)
-#endif
-
 #ifndef UNIX_PATH_MAX
 /* #define UNIX_PATH_MAX  (sizeof(((struct sockaddr_un *)0)->sun_path)) */
 #define UNIX_PATH_MAX  128 /* actual sizeof() will be applied later anyway */