* cygheap.h (cygheap_fdnew): Avoid setting errno directly since it will have

been set by a previous function.
* dtable.h (dtable::extend): Accept second size_t argument.
* dtable.cc (dtable::extend): Accept second "min" argument which allows
checking for OPEN_MAX_MAX boundary conditions.
(dtable_init): Accommodate second argument to dtable::extend.
(dtable::find_unused_handle): Ditto.
* syscalls.cc (setdtablesize): Ditto.
(dup): Return any error passed by cygheap_fdnew() directly.
(getdtablesize): Just return dtable size directly.
This commit is contained in:
Christopher Faylor
2013-12-05 19:43:34 +00:00
parent 2f8a6f1947
commit 09244c002e
5 changed files with 33 additions and 10 deletions

View File

@@ -457,7 +457,7 @@ class cygheap_fdnew : public cygheap_fdmanip
locked = lockit;
else
{
set_errno (EMFILE);
/* errno set by find_unused_handle */
if (lockit)
cygheap->fdtab.unlock ();
locked = false;