View | Details | Raw Unified | Return to bug 261205 | Differences between
and this patch

Collapse All | Expand All

(-)lib/thread.c (-2 / +3 lines)
Lines 531-537 thread_master_create () Link Here
531
      return NULL;
531
      return NULL;
532
    }
532
    }
533
533
534
  rv->fd_limit = (int)limit.rlim_cur;
534
  rv->fd_limit = ((int)limit.rlim_cur < FD_SETSIZE ?
535
		  (int)limit.rlim_cur : FD_SETSIZE);
535
  rv->read = XCALLOC (MTYPE_THREAD, sizeof (struct thread *) * rv->fd_limit);
536
  rv->read = XCALLOC (MTYPE_THREAD, sizeof (struct thread *) * rv->fd_limit);
536
  if (rv->read == NULL)
537
  if (rv->read == NULL)
537
    {
538
    {
Lines 1187-1193 thread_fetch (struct thread_master *m) Link Here
1187
            timer_wait = timer_wait_bg;
1188
            timer_wait = timer_wait_bg;
1188
        }
1189
        }
1189
      
1190
      
1190
      num = fd_select (FD_SETSIZE, &readfd, &writefd, &exceptfd, timer_wait);
1191
      num = fd_select (m->fd_limit, &readfd, &writefd, &exceptfd, timer_wait);
1191
      
1192
      
1192
      /* Signals should get quick treatment */
1193
      /* Signals should get quick treatment */
1193
      if (num < 0)
1194
      if (num < 0)

Return to bug 261205