loolwsd/LOOLBroker.cpp | 2 +- loolwsd/Util.cpp | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
New commits: commit 1746094fcd2e8356d1da68d237eac51da3bbfcc1 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Wed Dec 30 11:41:41 2015 -0500 loolwsd: log the thread name where available Change-Id: If40b2d3a72f3e00e8c3bf27fe60c6d63a71df267 Reviewed-on: https://gerrit.libreoffice.org/21062 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/LOOLBroker.cpp b/loolwsd/LOOLBroker.cpp index 71e4d28..31c114b 100644 --- a/loolwsd/LOOLBroker.cpp +++ b/loolwsd/LOOLBroker.cpp @@ -393,7 +393,7 @@ public: else if (aPoll.revents & (POLLERR | POLLHUP)) { - Log::error("Broken pipe [" + FIFO_FILE + "] with broker."); + Log::error("Broken pipe [" + FIFO_FILE + "] with wsd."); break; } } diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp index 62883c2..81e3b7d 100644 --- a/loolwsd/Util.cpp +++ b/loolwsd/Util.cpp @@ -8,6 +8,9 @@ */ #include <sys/poll.h> +#ifdef __linux +#include <sys/prctl.h> +#endif #include <cstdlib> #include <cstring> @@ -96,6 +99,12 @@ namespace Log << std::setw(2) << seconds << "." << std::setw(6) << usec << ", "; +#ifdef __linux + char buf[32]; // we really need only 16 + if (prctl(PR_GET_NAME, reinterpret_cast<unsigned long>(buf), 0, 0, 0) == 0) + stream << '[' << buf << "] "; +#endif + return stream.str(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits