This is the mail archive of the
mailing list for the Cygwin project.
- From: Gaurav Sachdeva <sachdeva dot gaurav at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sat, 6 Feb 2010 00:13:59 +0530
- Subject: pthread problem
I have written following code -
void *thread_func(void *data)
rc = pthread_create(&mythread, NULL, thread_func, NULL);
printf("ERROR; return code from pthread_create() is %d\n", rc);
It must print both "In main" and "In thread".
But sometimes it prints one of these two and sometimes both.
I tried in actual UNIX OS. It always prints both.
I also tried in c++ in cygwin, problem exists there also.
Is anyone aware of this problem and its solutions?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple