Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Thu, 9 Sep 2004 12:26:35 -0400
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: bash script doesn't wait for commands to complete
Message-ID: <20040909162635.GC28438@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <753F1E41ACB9D51190C00090277218D80171EE18@WWMESSD206>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <753F1E41ACB9D51190C00090277218D80171EE18@WWMESSD206>
User-Agent: Mutt/1.4.1i

On Thu, Sep 09, 2004 at 04:20:19PM +0100, Dolton Tony AB wrote:
>I have a problem whereby a bash script doesn't wait for foreground commands
>to complete. The script in question kicks off a number of background
>processes, and processes their results as they complete.
>
>A simplified version which exhibits the problem is attached as scr.sh. The
>number of background processes and the number of iterations of the
>foreground commands are supplied as parameters, (e.g. "./scr.sh 50 100").
>These values, as well as the length of the sleep may need adjustment
>depending on a machine's performance, to make sure that the sleeps terminate
>squarely within the foreground loop.

Cygwin currently has a hard limit of around 62 subprocesses or so before
things might get confusing.  There is a 63 handle windows limitation
which would take some effort to work around.

So, if you are starting more than around 62 subprocesses then things probably
won't work right.

cgf

--
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/

