diff options
author | Giel van Schijndel <me@mortis.eu> | 2012-06-24 17:03:57 +0200 |
---|---|---|
committer | Giel van Schijndel <me@mortis.eu> | 2012-07-17 01:50:35 +0200 |
commit | 96931d6f78ccc21ec38cd4655b1a250893a6f252 (patch) | |
tree | a7bd6c9bb2d0a9378b6db894b470126d0c2b4221 /src/init.cpp | |
parent | 1c009d622ded6dd254d6be5161b4df875d492d12 (diff) |
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 <me@mortis.eu>
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index 5c87af9112..83870f9f8c 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); |