Ticket #408: fix-off-by-one-maxfd.patch
File fix-off-by-one-maxfd.patch, 644 bytes (added by , 15 years ago) |
---|
-
xapian-core/backends/flint/flint_lock.cc
148 148 // Make sure we don't hang on to open files which may get deleted but 149 149 // not have their disk space released until we exit. 150 150 int maxfd = static_cast<int>(sysconf(_SC_OPEN_MAX)); 151 for (int i = 2; i < =maxfd; ++i) {151 for (int i = 2; i < maxfd; ++i) { 152 152 if (i != lockfd) { 153 153 // Retry on EINTR; just ignore other errors (we'll get 154 154 // EBADF if the fd isn't open so that's OK).