]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Cannot join detached threads. See http://www.opengroup.org/onlinepubs/000095399...
authorTilghman Lesher <tilghman@meg.abyt.es>
Thu, 30 Oct 2008 20:33:28 +0000 (20:33 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Thu, 30 Oct 2008 20:33:28 +0000 (20:33 +0000)
(Closes issue #13400)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@152958 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_h323.c

index 710ebf37edcff8149744df94230c8b47fa7c8fb8..4844c691cbcab13d1357b112f3bc1a5669d53b29 100644 (file)
@@ -3226,11 +3226,12 @@ static int unload_module(void)
        }
        if (!ast_mutex_lock(&monlock)) {
                if ((monitor_thread != AST_PTHREADT_STOP) && (monitor_thread != AST_PTHREADT_NULL)) {
-                       /* this causes a seg, anyone know why? */
-                       if (monitor_thread != pthread_self())
+                       if (monitor_thread != pthread_self()) {
                                pthread_cancel(monitor_thread);
+                       }
                        pthread_kill(monitor_thread, SIGURG);
-                       pthread_join(monitor_thread, NULL);
+                       /* Cannot join detached threads */
+                       /* pthread_join(monitor_thread, NULL); */
                }
                monitor_thread = AST_PTHREADT_STOP;
                ast_mutex_unlock(&monlock);