odd socketpair() failure
Thu Aug 4 08:26:00 GMT 2011
On Aug 3 17:09, Eric Blake wrote:
> A while ago, I tested pipe() for EMFILE failures . Well, I
> repeated those tests for socketpair() , and cygwin is once again
> the odd man out.
> after fd 3199, open failed with errno 24 Too many open files
> try 1, socketpair returned -1 errno 24 Too many open files, fds -2 -3
> try 2, socketpair returned -1 errno 24 Too many open files, fds -2 -3
> try 3, socketpair returned -1 errno 24 Too many open files, fds -2 -3
> But on Linux, try 3 succeeds. Something in cygwin is not quite
> right on try 3 - the program explicitly freed two fd slots (0 and
> 3199), so it should have plenty of room to create the socketpair
> without hitting EMFILE.
The socketpair function forgot to free the descriptor slot of the first
socket if there was no room left for the second socket. Fixed in CVS.
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin