Created
January 24, 2014 17:31
-
-
Save sapier/8602068 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/log.cpp b/src/log.cpp | |
index 97f25cc..630c142 100644 | |
--- a/src/log.cpp | |
+++ b/src/log.cpp | |
@@ -57,13 +57,15 @@ void log_remove_output(ILogOutput *out) | |
log_outputs[i].erase(it); | |
} | |
} | |
- | |
+#include <sys/prctl.h> | |
void log_register_thread(const std::string &name) | |
{ | |
threadid_t id = get_current_thread_id(); | |
log_threadnamemutex.Lock(); | |
log_threadnames[id] = name; | |
log_threadnamemutex.Unlock(); | |
+ | |
+ prctl(PR_SET_NAME,name.c_str(),0,0,0); | |
} | |
void log_deregister_thread() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment