mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
thread.c (rb_thread_fd_select): fix off-by-one with sigwait_fd
select(2) needs the nfds argument to be one higher than the largest FD in the sets :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
883422b191
commit
6056dae7f4
1 changed files with 1 additions and 1 deletions
2
thread.c
2
thread.c
|
@ -4028,7 +4028,7 @@ rb_thread_fd_select(int max, rb_fdset_t * read, rb_fdset_t * write, rb_fdset_t *
|
|||
rb_fd_set(set.sigwait_fd, set.rset);
|
||||
else
|
||||
set.rset = init_set_fd(set.sigwait_fd, &set.orig_rset);
|
||||
if (set.sigwait_fd > set.max) {
|
||||
if (set.sigwait_fd >= set.max) {
|
||||
set.max = set.sigwait_fd + 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue