From 8e4a2e5ea578ac4f0f41edb6145d5c0040e33ec2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 16 Feb 2018 20:24:37 +0000 Subject: Name threads on Linux. --- src/lib/json_server.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/lib/json_server.cc') diff --git a/src/lib/json_server.cc b/src/lib/json_server.cc index e171a6307..3f43a75eb 100644 --- a/src/lib/json_server.cc +++ b/src/lib/json_server.cc @@ -52,7 +52,10 @@ enum State { JSONServer::JSONServer (int port) { - new thread (boost::bind (&JSONServer::run, this, port)); + thread* t = new thread (boost::bind (&JSONServer::run, this, port)); +#ifdef DCPOMATIC_LINUX + pthread_setname_np (t->native_handle(), "json-server"); +#endif } void -- cgit v1.2.3