X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A509EDA.7060903@gmail.com>
Date: Sun, 05 Jul 2009 13:38:50 +0100
From: Dave Korn <dave.korn.cygwin@googlemail.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: Dave Korn <dave.korn.cygwin@googlemail.com>
CC: cygwin@cygwin.com
Subject: Re: How to spawn from big-stack program
References: <af075b00906260708h674121f3s63fdc79af5675a44@mail.gmail.com>    <416096c60906270139y33e2888cq148430eebb744b71@mail.gmail.com>    <20090628103010.GT30864@calimero.vinschen.de>    <af075b00907020941i666bed61vc450315c662b757a@mail.gmail.com>    <20090702174425.GC9839@ednor.casa.cgf.cx>   <af075b00907030218p54b606ds813e824422de04fa@mail.gmail.com>    <20090703104423.GA18746@calimero.vinschen.de>   <20090703150212.GA26858@ednor.casa.cgf.cx>    <20090704161431.GB11034@ednor.casa.cgf.cx>   <20090705001152.GA2510@ednor.casa.cgf.cx>  <416096c60907050233q344d37cds41859c611c7ab660@mail.gmail.com> <Pine.LNX.4.64.0907051226240.2008@tyr.diku.dk> <4A509DC5.6070506@gmail.com>
In-Reply-To: <4A509DC5.6070506@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

Dave Korn wrote:

> 207           htobe = CreateThread (&sec_none_nih, 0, is_freerange ?
> simplestub: stub,
> 208                                 this, 0, &id);
> 209           if (!htobe)
> 210             api_fatal ("CreateThread failed for %s - %p<%p>, %E", name,
> h, id);

  This is a problem actually.

> 953       waiter_ready = false;
> 954       /* Fire up a new thread to track the subprocess */
> 955       cygthread *h = new cygthread (proc_waiter, 0, this, "proc_waiter");

  The new process has already been fired up in a suspended state by this time,
and if the cygthread c-tor exits, we leave the half-built process lying around
forever.

    cheers,
      DaveK


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

