summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/uthread/uthread_poll.c
diff options
context:
space:
mode:
authorkurt <kurt@openbsd.org>2007-04-27 12:59:24 +0000
committerkurt <kurt@openbsd.org>2007-04-27 12:59:24 +0000
commit432a5931e9ee059122623c455cd15820456de69f (patch)
treee8db4e66804261372f85504c5589dc394fc8b7a0 /lib/libpthread/uthread/uthread_poll.c
parentRemove unneeded #include's, as already done for disklabel. CPU_BIOS (diff)
downloadwireguard-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_poll.c')
-rw-r--r--lib/libpthread/uthread/uthread_poll.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/uthread/uthread_poll.c b/lib/libpthread/uthread/uthread_poll.c
index d667a5a1ed4..8f445235e30 100644
--- a/lib/libpthread/uthread/uthread_poll.c
+++ b/lib/libpthread/uthread/uthread_poll.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_poll.c,v 1.13 2006/10/25 14:32:04 kurt Exp $ */
+/* $OpenBSD: uthread_poll.c,v 1.14 2007/04/27 12:59:24 kurt Exp $ */
/*
* Copyright (c) 1999 Daniel Eischen <eischen@vigrid.com>
* All rights reserved.
@@ -56,8 +56,8 @@ poll(struct pollfd fds[], nfds_t nfds, int timeout)
/* This is a cancellation point: */
_thread_enter_cancellation_point();
- if (numfds > (nfds_t)_thread_dtablesize) {
- numfds = _thread_dtablesize;
+ if (numfds > (nfds_t)_thread_max_fdtsize) {
+ numfds = _thread_max_fdtsize;
}
/* Check if a timeout was specified: */
if (timeout == INFTIM) {