Messages in this thread | | | From | Roland McGrath <> | Subject | Re: main thread pthread_exit/sys_exit bug! | Date | Thu, 5 Feb 2009 13:22:34 -0800 (PST) |
| |
> Yes we have the bug, and wait_task_stopped() should be fixed. But it is > buggy anyway, even if we delay the death of the main thread. But I also > think we shouldn't.
Sorry, I'd missed the actual bug report among all the tangential verbiage. I wrote this test case for it. Is there any problem other than this one?
Thanks, Roland
==========
#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <pthread.h> #include <assert.h>
static void * thfunc (void *arg) { sleep (2); puts ("stopping"); raise (SIGSTOP); puts ("resumed"); exit (0); }
int main (void) { pthread_t th; int rc = pthread_create (&th, NULL, &thfunc, NULL); assert_perror (rc); pthread_exit (0); /*NOTREACHED*/ return 1; }
| |