X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <002501c922da$bde360e0$0200a8c0@whiterabc2znlh>
From: "Hirokazu Yamamoto" <ocean-city@m2.ccsnet.ne.jp>
To: <cygwin@cygwin.com>
References: <003301c92110$336cee20$0200a8c0@whiterabc2znlh> <48DF3317.5060300@sh.cvut.cz> <20080928152527.GA2219@ednor.casa.cgf.cx> <48DFA78A.3020506@sh.cvut.cz> <20080928162701.GB2219@ednor.casa.cgf.cx> <002901c92241$9cfc7860$0200a8c0@whiterabc2znlh> <20080930011632.GA5668@ednor.casa.cgf.cx> <20080930030431.GA29887@ednor.casa.cgf.cx>
Subject: Re: crash if fork(2) from another thread
Date: Tue, 30 Sep 2008 17:58:43 +0900
MIME-Version: 1.0
Content-Type: text/plain; 	charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Outlook Express 6.00.2800.1933
X-IsSubscribed: yes
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

>>I also confirmed previous code worked fine with Cygwin 1.7.
> >>But attached code hangs on Cygwin 1.7. (Actually this is what
> >>test_3_join_in_forked_from_thread is doing)
> >
> >I can duplicate this.  I'll investigate it as I have time.
>
> It should be fixed in the latest snapshot.

Thanks, I confirmed the problem was fixed on snapshot.
test_3_join_in_forked_from_thread doesn't hang now.

The test still fails, but this is because fork() copies only calling thread,
not main thread which will call fflush(stdout) on program termination.
This is allowed in POSIX, so expected behavior.


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

