Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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: <4169759A.4F3BD401@dessent.net> Date: Sun, 10 Oct 2004 10:47:06 -0700 From: Brian Dessent Organization: My own little world... MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: child thread termination causes main thread error termination References: <7e48807e0485 DOT 7e04857e4880 AT tampabay DOT rr DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com gmiller AT cfl DOT rr DOT com wrote: > > I have a sample thread application that runs under Ferdora Core 2 latest but exits on an error condition under cygwin. "lab4_1.c" Oh boy, there's nothing I like better than fixing someone's homework assignment. That aside, what you included doesn't compile: lab4_1.c:13:32: ../inc/local_mutex.h: No such file or directory lab4_1.c:49: error: `PTHREAD_COND_INITIALIZER' undeclared here (not in a function) lab4_1.c:50: error: `PTHREAD_MUTEX_INITIALIZER' undeclared here (not in a function) lab4_1.c:52: error: `PTHREAD_COND_INITIALIZER' undeclared here (not in a function) lab4_1.c:53: error: `PTHREAD_MUTEX_INITIALIZER' undeclared here (not in a function) lab4_1.c:55: error: `PTHREAD_MUTEX_INITIALIZER' undeclared here (not in a function) If you remove the "../inc/local_mutex.h" thing, whatever that is, and include pthread.h as you should, it compiles and runs fine: $ ./lab4_1 waiting do_one_thing waiting do_another_thing Ready to start threads ..... &Starting ... do_one_thing +++++Starting ... do_another_thing ---------+++++-----------+++++++++++---------+++++++++++-----------++++++++-----------+++++++++++--------+++++++++++-----------+++++++++++--------+++++++++++-----------++++++++------++++++++@(!(-----@)#^ All threads complete !) wrap up: doing another 100, another 100, total 200 Brian -- 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/