xserver: Branch 'master'
Peter Hutterer
whot at kemper.freedesktop.org
Wed Oct 26 23:53:12 UTC 2016
os/inputthread.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 5cb328338684d8e5b03913c47475bfcd7acffec4
Author: Peter Hutterer <peter.hutterer at who-t.net>
Date: Wed Oct 26 12:21:16 2016 +0200
inputthread: On Linux leave the main thread's name as-is
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>
Signed-off-by: Hans de Goede <hdegoede at redhat.com>
diff --git a/os/inputthread.c b/os/inputthread.c
index ddafa7f..8e7f2ed 100644
--- a/os/inputthread.c
+++ b/os/inputthread.c
@@ -431,11 +431,13 @@ InputThreadPreInit(void)
}
hotplugPipeWrite = hotplugPipe[1];
+#ifndef __linux__ /* Linux does not deal well with renaming the main thread */
#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
+#endif
}
More information about the xorg-commit
mailing list