From 96931d6f78ccc21ec38cd4655b1a250893a6f252 Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Sun, 24 Jun 2012 17:03:57 +0200 Subject: Give threads a recognisable name to aid in debugging NOTE: These thread names are visible in gdb when using 'info threads'. Additionally both 'top' and 'ps' show these names *unless* told to display the command-line instead of task name. Signed-off-by: Giel van Schijndel --- src/init.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 5c87af911..83870f9f8 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -53,6 +53,10 @@ void Shutdown(void* parg) { static CCriticalSection cs_Shutdown; static bool fTaken; + + // Make this thread recognisable as the shutdown thread + RenameThread("bitcoin-shutoff"); + bool fFirstThread = false; { TRY_LOCK(cs_Shutdown, lockShutdown); -- cgit v1.2.3