diff options
Diffstat (limited to 'lib/libpthread/uthread/uthread_dup2.c')
-rw-r--r-- | lib/libpthread/uthread/uthread_dup2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpthread/uthread/uthread_dup2.c b/lib/libpthread/uthread/uthread_dup2.c index 0ed5578686f..8bd4d5b4bba 100644 --- a/lib/libpthread/uthread/uthread_dup2.c +++ b/lib/libpthread/uthread/uthread_dup2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uthread_dup2.c,v 1.10 2006/10/03 02:29:14 kurt Exp $ */ +/* $OpenBSD: uthread_dup2.c,v 1.11 2007/04/27 12:59:24 kurt Exp $ */ /* PUBLIC DOMAIN <marc@snafu.org> */ #include <errno.h> @@ -13,7 +13,7 @@ dup2(int fd, int newfd) int ret; int saved_errno; - if (newfd >= 0 && newfd < _thread_dtablesize && + if (newfd >= 0 && newfd < _thread_max_fdtsize && newfd != _thread_kern_pipe[0] && newfd != _thread_kern_pipe[1]) { ret = _FD_LOCK(fd, FD_RDWR, NULL); if (ret == 0) { |