lkml.org 
[lkml]   [2009]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: main thread pthread_exit/sys_exit bug!
Date
> 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;
}


\
 
 \ /
  Last update: 2009-02-05 22:35    [W:0.061 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site