[PATCH xserver] inputthread: leave the main thread's name as-is

Peter Hutterer peter.hutterer at who-t.net
Tue Oct 18 04:13:47 UTC 2016


On Linux, setting the main thread's name changes the program name
(/proc/self/comm). Setting it to MainThread breaks scripts that rely on
the command name, e.g. ps -C Xorg.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 os/inputthread.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/os/inputthread.c b/os/inputthread.c
index 4980502..65247b4 100644
--- a/os/inputthread.c
+++ b/os/inputthread.c
@@ -433,12 +433,6 @@ InputThreadPreInit(void)
     }
     hotplugPipeWrite = hotplugPipe[1];
 
-#if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID)
-    pthread_setname_np (pthread_self(), "MainThread");
-#elif defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID)
-    pthread_setname_np ("MainThread");
-#endif
-
 }
 
 /**
-- 
2.7.4



More information about the xorg-devel mailing list