From: noer AT cygnus DOT com (Geoffrey Noer) Subject: Re: error when maxing out processes 15 Nov 1998 19:48:45 -0800 Message-ID: <19981115192813.06179.cygnus.cygwin32.developers@cygnus.com> References: <01BD90CC DOT FDA159E0 AT sos> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: Sergey Okhapkin Cc: "'Christopher Faylor'" , "cygwin32-developers AT cygnus DOT com" On Fri, Jun 05, 1998 at 09:57:52PM +0400, Sergey Okhapkin wrote: > > Christopher Faylor wrote: > > >I'll look into PCTS sources - it checks some value and reports an error > > >when is able to fork more than this number of processes on cygwin :-) > > >Probably, it checks _POSIX_CHILD_MAX defined in . > > > > I will make some changes to fork/spawn to return errors and set errno > > when the process limit is reached. If someone can tell me what constant > > I should be using/reporting I'll fix that too. > > PCTS checks for _POSIX_CHILD_MAX. This must be defined as 63 in > limits.h and must be checked in fork/spawn code. Going back over old mail... _POSIX_CHILD_MAX is set to "6" which it should be. The _POSIX_* values are the minimum maximum values for various things. In this case, POSIX requires that the maximum number of children be at least "6". That value shouldn't vary from system, even though the actual maximum may vary. So I'm going to define CHILD_MAX to 63 in limits.h and return that value in sysconf(). Changes to support checking this limit in fork/spawn should be made, assuming this hasn't been done already. -- Geoffrey Noer noer AT cygnus DOT com