From: Marko Kreen Date: Wed, 12 Sep 2007 09:32:49 +0000 (+0000) Subject: remove too paranoid fd cleanup X-Git-Tag: pgbouncer_1_1~15 X-Git-Url: http://waps.l3s.uni-hannover.de/gitweb/queryCache.php?a=commitdiff_plain;h=684e7e3803714f477fa0755ce3445d6ec5e765b5;p=pgbouncer.git remove too paranoid fd cleanup --- diff --git a/src/main.c b/src/main.c index 00b932a..cd00d1b 100644 --- a/src/main.c +++ b/src/main.c @@ -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) diff --git a/src/system.h b/src/system.h index bd33a23..4e082c3 100644 --- a/src/system.h +++ b/src/system.h @@ -63,10 +63,6 @@ #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 */