Ticket #1562: Fix-372-and-1562.patch

File Fix-372-and-1562.patch, 1.2 kB (added by stbuehler, 5 months ago)

Patch for 1.4 and 1.5

  • a/src/fdevent_solaris_devpoll.c

    old new  
    6767        int ret; 
    6868 
    6969        dopoll.dp_timeout = timeout_ms; 
    70         dopoll.dp_nfds = ev->maxfds
     70        dopoll.dp_nfds = ev->maxfds - 1
    7171        dopoll.dp_fds = ev->devpollfds; 
    7272 
    7373        ret = ioctl(ev->devpoll_fd, DP_POLL, &dopoll); 
  • a/src/server.c

    old new  
    697697                        } 
    698698                } 
    699699 
    700                 /* #372: solaris need some fds extra for devpoll */ 
    701                 if (rlim.rlim_cur > 10) rlim.rlim_cur -= 10; 
    702  
    703700                if (srv->event_handler == FDEVENT_HANDLER_SELECT) { 
    704701                        srv->max_fds = rlim.rlim_cur < FD_SETSIZE - 200 ? rlim.rlim_cur : FD_SETSIZE - 200; 
    705702                } else {