diff options
Diffstat (limited to 'main/freeswitch/0001-fix-joining-to-threads.patch')
-rw-r--r-- | main/freeswitch/0001-fix-joining-to-threads.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/main/freeswitch/0001-fix-joining-to-threads.patch b/main/freeswitch/0001-fix-joining-to-threads.patch new file mode 100644 index 0000000000..f223e30786 --- /dev/null +++ b/main/freeswitch/0001-fix-joining-to-threads.patch @@ -0,0 +1,40 @@ +From 914a9e09b56696311b9fce8acfa9380c74eb8e23 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi> +Date: Thu, 21 May 2015 12:53:38 +0300 +Subject: [PATCH] fix joining to threads + +do not detach threads that we later join to. joining to detached +thread invokes unspecified behaviour (usually crash). +--- + src/switch_log.c | 2 -- + src/switch_scheduler.c | 1 - + 2 files changed, 3 deletions(-) + +diff --git a/src/switch_log.c b/src/switch_log.c +index 00ae7c0..c512b2d 100644 +--- a/src/switch_log.c ++++ b/src/switch_log.c +@@ -512,8 +512,6 @@ SWITCH_DECLARE(switch_status_t) switch_log_init(switch_memory_pool_t *pool, swit + LOG_POOL = pool; + + switch_threadattr_create(&thd_attr, LOG_POOL); +- switch_threadattr_detach_set(thd_attr, 1); +- + + switch_queue_create(&LOG_QUEUE, SWITCH_CORE_QUEUE_LEN, LOG_POOL); + #ifdef SWITCH_LOG_RECYCLE +diff --git a/src/switch_scheduler.c b/src/switch_scheduler.c +index e734bad..16fc59d 100644 +--- a/src/switch_scheduler.c ++++ b/src/switch_scheduler.c +@@ -335,7 +335,6 @@ SWITCH_DECLARE(void) switch_scheduler_task_thread_start(void) + switch_mutex_init(&globals.task_mutex, SWITCH_MUTEX_NESTED, globals.memory_pool); + switch_queue_create(&globals.event_queue, 250000, globals.memory_pool); + +- switch_threadattr_detach_set(thd_attr, 1); + switch_thread_create(&task_thread_p, thd_attr, switch_scheduler_task_thread, NULL, globals.memory_pool); + } + +-- +2.4.1 + |