delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/28/12:48:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <6.1.2.0.0.20041028093914.01d24ec0@localhost>
X-Sender: jdeifik AT weasel DOT com
Date: Thu, 28 Oct 2004 09:47:21 -0700
To: cygwin AT cygwin DOT com
From: jdeifik <jdeifik AT weasel DOT com>
Subject: Re: Problem with pthead.h - child's thread ending, causes main program to exit
In-Reply-To: <Pine.CYG.4.58.0410281116560.2868@fordpc.vss.fsi.com>
References: <6 DOT 1 DOT 2 DOT 0 DOT 0 DOT 20041027164547 DOT 01cffec0 AT localhost> <Pine DOT CYG DOT 4 DOT 58 DOT 0410280941080 DOT 2868 AT fordpc DOT vss DOT fsi DOT com> <6 DOT 1 DOT 2 DOT 0 DOT 0 DOT 20041028090536 DOT 01e9c470 AT localhost> <Pine DOT CYG DOT 4 DOT 58 DOT 0410281116560 DOT 2868 AT fordpc DOT vss DOT fsi DOT com>
Mime-Version: 1.0
X-IsSubscribed: yes

--=======27BBC3E=======
Content-Type: text/plain; x-avg-checked=avg-ok-298E692B; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

At 09:27 AM 10/28/2004, you wrote:

>On Thu, 28 Oct 2004, jdeifik wrote:
> > Brian Ford wrote:
> > >On Wed, 27 Oct 2004, jdeifik wrote:
> > > > Using cygwin and windows xp sp2, when one thread reaches the end
> > > > of execution, the entire program exits.
> > >
> > >And you know this is really what happens because...?
> > >
> > >Or, is it this bug?
> > >
> > >http://cygwin.com/ml/cygwin/2004-09/msg00257.html
> >
> > Doesn't seem likely, as I never call pthread_join.
>
>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.

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

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.

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

         Jeff Deifik 


--=======27BBC3E=======
Content-Type: text/plain; charset=us-ascii

--
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/
--=======27BBC3E=======--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019