From: Helge Norberg Date: Mon, 3 Oct 2016 20:21:39 +0000 (+0200) Subject: [linux] Don't overwrite thread name if it is already set. X-Git-Tag: 2.1.0_Beta1~42 X-Git-Url: https://git.sesse.net/?p=casparcg;a=commitdiff_plain;h=653e0f20ac0c995aadb2b4e3738660b606a2ddf3 [linux] Don't overwrite thread name if it is already set. --- diff --git a/common/os/linux/signal_handlers.cpp b/common/os/linux/signal_handlers.cpp index 3ab4a7332..27d74b6ef 100644 --- a/common/os/linux/signal_handlers.cpp +++ b/common/os/linux/signal_handlers.cpp @@ -54,10 +54,12 @@ void ensure_gpf_handler_installed_for_thread( { static const int MAX_LINUX_THREAD_NAME_LEN = 15; static auto install = []() { do_install_handlers(); return 0; } (); + + auto& for_thread = get_thread_info(); - if (thread_description) + if (thread_description && for_thread.name.empty()) { - get_thread_info().name = thread_description; + for_thread.name = thread_description; if (std::strlen(thread_description) > MAX_LINUX_THREAD_NAME_LEN) {