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, 28 Oct 2004 12:13:42 -0500
From: Brian Ford <ford@vss.fsi.com>
Reply-To: cygwin@cygwin.com
To: jdeifik <jdeifik@weasel.com>
cc: cygwin@cygwin.com
Subject: Re: Problem with pthead.h - child's thread ending, causes main program to exit
In-Reply-To: <6.1.2.0.0.20041028093914.01d24ec0@localhost>
Message-ID: <Pine.CYG.4.58.0410281211320.2216@fordpc.vss.fsi.com>
References: <6.1.2.0.0.20041027164547.01cffec0@localhost> <Pine.CYG.4.58.0410280941080.2868@fordpc.vss.fsi.com> <6.1.2.0.0.20041028090536.01e9c470@localhost> <Pine.CYG.4.58.0410281116560.2868@fordpc.vss.fsi.com> <6.1.2.0.0.20041028093914.01d24ec0@localhost>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-IsSubscribed: yes

On Thu, 28 Oct 2004, jdeifik wrote:

> At 09:27 AM 10/28/2004, Brian Ford wrote:
> >You missed the point of that thread.  The bug has nothing to do with
> >pthread_join, but with the stdio handles being closed on pthread_exit.
> >Thus, if you are trying to deduce that the entire program exits because
> >you see no more stdio, you have reached an incorrect conclusion.
>
> I deduced the entire program exits, because it exits, and returns a new
> command line prompt.

Ok.

> I suppose it is possible that the threads all terminated normally,
> except they failed to generate all of their output because stdio got
> closed.

Probably.

> What I observed was less output than the other threads were supposed to
> generate, and me getting a command prompt. Since I saw less output that
> I should have, I deduced that the threads exited rather than stdio got
> hosed. I also had fprintf(stderr,... code to debug what was going on,
> and it stopped also.

I think the bug effected all stdio, not just stdout.

> In any event, it seems the latest snapshot fixes the problem.

Great.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...

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

