Better thread name

This commit is contained in:
Kovid Goyal
2017-09-06 18:41:39 +05:30
parent e8b5a72c96
commit 1684bda1e9

View File

@@ -429,10 +429,11 @@ io_loop(void *data) {
Screen *screen; Screen *screen;
ChildMonitor *self = (ChildMonitor*)data; ChildMonitor *self = (ChildMonitor*)data;
#define THREAD_NAME "KittyChildMon"
#ifdef __APPLE__ #ifdef __APPLE__
pthread_setname_np("ChildMonitor"); pthread_setname_np(THREAD_NAME);
#else #else
pthread_setname_np(self->io_thread, "ChildMonitor"); pthread_setname_np(self->io_thread, THREAD_NAME);
#endif #endif
while (LIKELY(!self->shutting_down)) { while (LIKELY(!self->shutting_down)) {