diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-03-14 16:51:13 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-03-14 16:51:13 +0100 |
commit | 25154b62452926c5f558fc5f662168ddbdcd4422 (patch) | |
tree | 84d66817fbfac001cdedb6a0246c5c74acb3ed5e /thread.c | |
parent | faea9fed916712f0bc1bae0ba405d4d99ac4f401 (diff) | |
download | vdr-25154b62452926c5f558fc5f662168ddbdcd4422.tar.gz vdr-25154b62452926c5f558fc5f662168ddbdcd4422.tar.bz2 |
Fixed a memory leak in thread handling when using NPTL
Diffstat (limited to 'thread.c')
-rw-r--r-- | thread.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: thread.c 1.30 2004/01/03 16:59:33 kls Exp $ + * $Id: thread.c 1.31 2004/03/14 16:48:30 kls Exp $ */ #include "thread.h" @@ -199,6 +199,7 @@ bool cThread::Start(void) running = true; parentTid = pthread_self(); pthread_create(&childTid, NULL, (void *(*) (void *))&StartThread, (void *)this); + pthread_detach(childTid); // auto-reap pthread_setschedparam(childTid, SCHED_RR, 0); usleep(10000); // otherwise calling Active() immediately after Start() causes a "pure virtual method called" error } |