Changeset 2082

Show
Ignore:
Timestamp:
02/26/2008 04:20:04 PM (6 months ago)
Author:
stbuehler
Message:

r2087@chromobil: stefan | 2008-02-26 17:01:12 +0100
Fix #1562 and try re-fixing #372: out of range access in fd array


  • Bug is in original #372 fix [853]
  • The re-fix for #372 is not tested: the problem is that Solaris doesn't want to poll for maxfds (ulimit) events, as at least one filedescriptor is used for the poll device. So the solution is to just ask for one event less; the number of events actually available is returned by the poll syscall, so it should work.


Location:
branches/lighttpd-1.4.x/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/lighttpd-1.4.x/src/fdevent_solaris_devpoll.c

    r1371 r2082  
    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 
  • branches/lighttpd-1.4.x/src/server.c

    r2049 r2082  
    697697                        } 
    698698                } 
    699  
    700                 /* #372: solaris need some fds extra for devpoll */ 
    701                 if (rlim.rlim_cur > 10) rlim.rlim_cur -= 10; 
    702699 
    703700                if (srv->event_handler == FDEVENT_HANDLER_SELECT) {