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 X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs Date: Thu, 9 Jan 2003 14:45:30 -0600 (CST) From: Brian Ford X-X-Sender: ford AT eos To: cygwin AT cygwin DOT com Subject: gdb attach hang (w/pthreads on Cygwin) Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII gdb on Cygwin can not attach to a running process if the main thread has exited via a call to pthread_exit(). The attach just hangs. Here is the test case: w/o GDB_HANG defined, all is well; with GDB_HANG defined, attaching is not possible. #include #include void * spinner(void *v) { for (;;) sleep(500); return NULL; } int main(void) { pthread_t tid; pthread_create(&tid, NULL, spinner, NULL); #ifdef GDB_HANG pthread_exit(NULL); #else for (;;) sleep(500); #endif return 0; } Thanks. -- Brian Ford Senior Realtime Software Engineer VITAL - Visual Simulation Systems FlightSafety International Phone: 314-551-8460 Fax: 314-551-8444 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/