delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/07/21:43:20

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
MIME-Version: 1.0
Subject: RE: sysconf(_SC_OPEN_MAX) limit
content-class: urn:content-classes:message
X-MimeOLE: Produced By Microsoft Exchange V6.0.4417.0
Date: Fri, 8 Jun 2001 11:33:38 +1000
Message-ID: <EA18B9FA0FE4194AA2B4CDB91F73C0EF08F051@itdomain002.itdomain.net.au>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
Thread-Topic: sysconf(_SC_OPEN_MAX) limit
Thread-Index: AcDvuqqIopmAOJO9TAe5e/q9XuryZgAAA3Iw
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: <cygwin AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id VAA25747

> -----Original Message-----
> From: Christopher Faylor [mailto:cgf AT redhat DOT com]
> Sent: Friday, June 08, 2001 11:40 AM
> To: cygwin AT cygwin DOT com
> Subject: Re: sysconf(_SC_OPEN_MAX) limit
> 
> 
> I checked into this.  sysconf() is returning the current size of the
> fd table.  The fd table starts at 32 and is extended as needed.
> 
> I don't know what sysconf should return, actually.  The number of
> possible fds is obviously not infinite but it is pretty 
> large.  Perhaps
> we should just return an arbitrary large number like 4096 or 
> something.

I just had that discussion off-list...

The maximum number of handles per process is 65,536, shared across
mutex's, open files, pipes, spinlocks etc. Note that cygwin may uses
more than 1 handles per fd for some fd's (ie two unidirectional pipes..)

Programs like squid and other servers will want a large number of fd's
avilable, so I suggest 16K as  a reasonable compromise.

Rob

> 
> cgf
> 
> On Thu, Jun 07, 2001 at 08:06:30PM -0400, Suhaib Siddiqi wrote:
> >Thanks Rob,
> >For me 255 was enough ;-)
> >
> >Suhaib
> >
> >> -----Original Message-----
> >> From: Robert Collins [mailto:robert DOT collins AT itdomain DOT com DOT au]
> >> Sent: Thursday, June 07, 2001 8:04 PM
> >> To: Suhaib Siddiqi; cygwin AT cygwin DOT com
> >> Subject: Re: sysconf(_SC_OPEN_MAX) limit
> >> 
> >> I think it's newlib that provides sysconf....
> >> 
> >> I'll see if I have time this weekend to dig into where the 
> 32 is coming
> >> from. 8192 /16384 sound good for the value returned?
> >> 
> >> Rob
> >> 
> >> ----- Original Message -----
> >> From: "Suhaib Siddiqi" <ssiddiqi AT inspirepharm DOT com>
> >> To: <cygwin AT cygwin DOT com>
> >> Sent: Friday, June 08, 2001 9:56 AM
> >> Subject: sysconf(_SC_OPEN_MAX) limit
> >> 
> >> 
> >> >
> >> > According to private communication with Chris, Cygwin 
> has no fd limit.
> >> >
> >> > However, we have a sysconf(_SC_OPEN_MAX) issue for 
> Cygwin/XFree86:
> >> >
> >> > why sysconf(_SC_OPEN_MAX) only returns 32 then. XFree86 
> returns errors
> >> once
> >> > max limit is hit.  One way to over come this is to hack the
> >> connections.c in
> >> > Xfree86, However, shouldn't
> >> > this be bumped up in the Cygwin rather than making 
> changes in source
> >> code
> >> > outside of
> >> > it. Maybe other people will come across the same problem in other
> >> > applications.
> >> >
> >> >
> >> > --
> >> > Want to unsubscribe from this list?
> >> > Check out: http://cygwin.com/ml/#unsubscribe-simple
> >> >
> >> >
> >
> >--
> >Want to unsubscribe from this list?
> >Check out: http://cygwin.com/ml/#unsubscribe-simple
> 
> -- 
> cgf AT cygnus DOT com                        Red Hat, Inc.
> http://sources.redhat.com/            http://www.redhat.com/
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 
> 

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019