* dtable.cc (dtable::find_unused_handle): When extending, always make sure that
there is a NOFILE_INCR chunk following the free fd.
This commit is contained in:
parent
6b5a341878
commit
9915ebec8a
@ -1,3 +1,8 @@
|
||||
2013-12-04 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||
|
||||
* dtable.cc (dtable::find_unused_handle): When extending, always make
|
||||
sure that there is a NOFILE_INCR chunk following the free fd.
|
||||
|
||||
2013-12-03 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||
|
||||
* select.cc (select): Add workaround for, as yet undebugged,
|
||||
|
@ -223,7 +223,9 @@ dtable::delete_archetype (fhandler_base *fh)
|
||||
int
|
||||
dtable::find_unused_handle (size_t start)
|
||||
{
|
||||
size_t extendby = (start >= size) ? 1 + start - size : NOFILE_INCR;
|
||||
/* When extending, always make sure that there is a NOFILE_INCR chunk
|
||||
following the empty fd. */
|
||||
size_t extendby = NOFILE_INCR + ((start >= size) ? 1 + start - size : 0);
|
||||
|
||||
/* This do loop should only ever execute twice. */
|
||||
int res = -1;
|
||||
|
Loading…
Reference in New Issue
Block a user