This is the mail archive of the cygwin@sources.redhat.com 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]

Re: Bug report: gcc + cygwin


On Wed, Nov 08, 2000 at 09:05:40PM +0200, Medve Emilian-EMMEDVE1 wrote:
>Thanx for the prompt response. I have some questions regarding your answer.
>
>How CygWin manages the size of fd table since the same program compiled with
>-mno-cygwin says that my Windows allows a process to have only 256 files
>opened at a time?

winsup/cygwin/dtable.cc contains the fd table handling code.  As far as
I know, Windows does not impose a handle limit on a process other than
system resource limits.

>You said that I used a terible method to find out the size of fd table. Do
>you know a better method? Can you tell it to me?

Well, cygwin really has no upper bounds so you'd have to choose something
arbitrary.  The normal way of doing this is to use sysconf (_SC_OPEN_MAX).
This just returns the current size of the table in cygwin, though.  The
comments in this code (winsup/cygwin/sysconf.cc) suggest that the NOFILE
or OPEN_MAX constants might be better.

You could probably just use an arbitrary number like 512, or something,
though.

cgf

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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