This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How many fds can *you* open?


I'm having trouble on both my recently-updated cygwin
machines.  They crash after opening 130 to 180 fds.
Here's a little program that just counts how many
fds it can open for /dev/null.  I suspect a few of
you will also have my problem.  Could you run this
and report back how many fds it reports, or whether it crashes?
Thanks,
Dan


#include <stdio.h>
#include <fcntl.h>

int main(int argc, char **argv)
{
	int i;
	for (i=0; open("/dev/null", O_RDONLY) != -1; i++)
		;
	printf("opened %d fds\n", i);
	return 0;
}

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]