[Libreoffice-commits] online.git: Branch 'private/hcvcastro/forking' - loolwsd/LOOLKit.cpp
Henry Castro
hcastro at collabora.com
Sun Aug 2 13:58:45 PDT 2015
loolwsd/LOOLKit.cpp | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 1bc8343c87985f3f52de8d090393660087085295
Author: Henry Castro <hcastro at collabora.com>
Date: Sun Aug 2 16:57:32 2015 -0400
loolwsd: set thread name to queue handler
diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index ab2b812..953b6a3 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -1,3 +1,4 @@
+#include <sys/prctl.h>
#include <memory>
#include <iostream>
@@ -48,6 +49,11 @@ public:
void run() override
{
+#ifdef __linux
+ if (prctl(PR_SET_NAME, reinterpret_cast<unsigned long>("queue_handler"), 0, 0, 0) != 0) {
+ std::cout << Util::logPrefix() << "Cannot set thread name :" << strerror(errno) << std::endl;
+ }
+#endif
while (true)
{
std::string input = _queue.get();
More information about the Libreoffice-commits
mailing list