diff options
author | 2007-04-27 12:59:24 +0000 | |
---|---|---|
committer | 2007-04-27 12:59:24 +0000 | |
commit | 432a5931e9ee059122623c455cd15820456de69f (patch) | |
tree | e8db4e66804261372f85504c5589dc394fc8b7a0 /lib/libpthread/uthread/uthread_select.c | |
parent | Remove unneeded #include's, as already done for disklabel. CPU_BIOS (diff) | |
download | wireguard-openbsd-432a5931e9ee059122623c455cd15820456de69f.tar.xz wireguard-openbsd-432a5931e9ee059122623c455cd15820456de69f.zip |
Use rlimit nofiles max to size fd/fdp tables instead of cur. Fixes
applications that increase nofiles using setrlimit(2). ok marc@
Diffstat (limited to 'lib/libpthread/uthread/uthread_select.c')
-rw-r--r-- | lib/libpthread/uthread/uthread_select.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/uthread/uthread_select.c b/lib/libpthread/uthread/uthread_select.c index b43820d506d..32d6ee7f255 100644 --- a/lib/libpthread/uthread/uthread_select.c +++ b/lib/libpthread/uthread/uthread_select.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_select.c,v 1.13 2006/10/25 14:32:04 kurt Exp $ */ +/* $OpenBSD: uthread_select.c,v 1.14 2007/04/27 12:59:24 kurt Exp $ */ /* * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. @@ -64,8 +64,8 @@ select(int numfds, fd_set * readfds, fd_set * writefds, /* This is a cancellation point: */ _thread_enter_cancellation_point(); - if (numfds > _thread_dtablesize) { - numfds = _thread_dtablesize; + if (numfds > _thread_max_fdtsize) { + numfds = _thread_max_fdtsize; } /* Check if a timeout was specified: */ if (timeout) { |