This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: pthread question - should this program run - does on Linux
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/