]> granicus.if.org Git - libevent/commitdiff
need to report one less file descriptor to solaris then the limit; reported
authorNiels Provos <provos@gmail.com>
Sat, 15 Jul 2006 02:39:31 +0000 (02:39 +0000)
committerNiels Provos <provos@gmail.com>
Sat, 15 Jul 2006 02:39:31 +0000 (02:39 +0000)
by Dave Pacheco

svn:r215

devpoll.c

index b4cdae27236298c30df5cf1869d283c670e5348f..6db53eaf6d06d038e5920c0551fd0007edf1e20f 100644 (file)
--- 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) {