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

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
Date: Thu, 28 Oct 2004 11:27:19 -0500
From: Brian Ford <ford AT vss DOT fsi DOT com>
Reply-To: cygwin AT cygwin DOT com
To: jdeifik <jdeifik AT weasel DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Problem with pthead.h - child's thread ending, causes main program to exit
In-Reply-To: <6.1.2.0.0.20041028090536.01e9c470@localhost>
Message-ID: <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>
MIME-Version: 1.0
X-IsSubscribed: yes

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.

> >If so, then please try a snapshot:
> >
> >http://cygwin.com/snapshots/
>
> The new cygwin1.dll fixed my problem.
> Everything seems fine now.

As I suspected above.

> > > I know others have problems with pthreads locking up main, but this seems
> > > different to me.
> >
> >You should quote a reference here as I am not aware of any such issue.
>
> there was a thread this week,
>
> From: Ben Lavender <blavender at gmail dot com>
> To: cygwin at cygwin dot com
> Date: Thu, 21 Oct 2004 15:43:49 +0200
> Subject: RE: problem with pthread.h - child thread's ending locks up main
> thread
>
> Since this was from oct 21, and my email was from oct 27, and I quoted
> the subject,  I didn't think I needed more context.

And the explanation for that issue was exactly the same as this one
(although maybe not entirely clear from this follow-up):

http://www.cygwin.com/ml/cygwin/2004-10/msg01001.html

Thus, it has nothing to do with "pthreads locking up main" as you
suggested; just stdio being closed.

I'm not trying to be mean, even if it is Cygwin's mantra.  I'm just trying
to clarify.

HTH

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

- Raw text -


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