This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Coredumps and pthreads on Linux w/glibc?


I'm running glibc 2.1.3 on x86 Linux (Kernel 2.2.14 SMP).  Can anyone tell me
why this program will not dump core when it segfaults?  I've set ulimit -c
unlimited, and if I comment-out pthread_create(), the program will dump core.


#include <pthread.h>
#include <unistd.h>

void*	shithead(void*	p)
{
	sleep(1000);
}

int	main(int argc, char* argv[])
{
	pthread_t	x;
	int*	shit = 0;

	pthread_create(&x, 0, shithead, 0);
	sleep(1);

	*shit	= 4;

	return 0;
}


I've been looking all over for the proper documentation for this, and I'm at a
loss.

--
George T. Talbot
<george at moberg dot com>

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]