From: Niels Provos Date: Sat, 15 Jul 2006 02:39:31 +0000 (+0000) Subject: need to report one less file descriptor to solaris then the limit; reported X-Git-Tag: release-2.0.1-alpha~732 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0ecf50727b291356ed2776d7b03a69cbc9f35b1;p=libevent need to report one less file descriptor to solaris then the limit; reported by Dave Pacheco svn:r215 --- diff --git a/devpoll.c b/devpoll.c index b4cdae27..6db53eaf 100644 --- a/devpoll.c +++ b/devpoll.c @@ -142,7 +142,7 @@ devpoll_init(void) if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && rl.rlim_cur != RLIM_INFINITY) - nfiles = rl.rlim_cur; + nfiles = rl.rlim_cur - 1; /* Initialize the kernel queue */ if ((dpfd = open("/dev/poll", O_RDWR)) == -1) {