delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/19/11:26:01

X-Spam-Check-By: sourceware.org
Date: Mon, 19 Mar 2007 12:25:30 -0400
To: cygwin AT cygwin DOT com
Subject: Re: pthread question - should this program run - does on Linux
X-Mailer: Virtual Access Open Source http://www.virtual-access.org/
Message-Id: <VA.00001557.003b9c12@thesoftwaresource.com>
Mime-Version: 1.0
From: Brian Keener <bkeenerReMoVeAnTiSpAm AT thesoftwaresource DOT com>
In-Reply-To: <20070317001633.GA19379@zoosmart.us>
References: <VA DOT 00001550 DOT 00852aa3 AT thesoftwaresource DOT com> <20070317001633 DOT GA19379 AT zoosmart DOT us>
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

Alex wrote:
> I got this (cygwin):
> 
> $ ./a
> Starting main now
> Creating thread 0
> 
> 0: hello world!
> Creating thread 1
> 
> 1: hello world!
> Creating thread 2
> 
> 2: hello world!
> Creating thread 3
> 
> 3: hello world!
> Creating thread 4
> 
> 4: hello world!
> 
> then the program exit

Ahhh,

found it.  I get the same thing Alex does if I change my startup for Cygwin.  
Force of habit from Unix machine I like to see the login prompt when I start 
Cygwin.  So I have my cygwin.bat set to use the login program as shown here:

start "bash Shell" CMD  /c bin\login.exe

in which case I get the results I posted from mythread_simple and the hang.  If 
I however change my cygwin.bat to use the standard Cygwin.bat which goes 
directly to a bash prompt as in this format:

bash --login -i

then I get the same results as Alex for mythread_simple.  The interesting thing 
here is that in version of cygwin.bat I also use this line:

start "Using rxvt/bash" CMD /c bin\rxvt -geometry 90x30 -fg grey -bg 
midnightblue -cr red -sr -sl 2000 -fn "Lucida Console-12" -tn rxvt -e 
/usr/bin/login

to invoke and rxvt.  In this case ( I just discovered while playing with this) 
the mythread_simple program works here as well - even though I am going through 
the login program. 

So question - is this a result of using the Start command or the fact I am 
using the start command with the login program.  Any ideas.

bk




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