Better thread name

This commit is contained in:
Kovid Goyal 2017-09-06 18:41:39 +05:30
parent e8b5a72c96
commit 1684bda1e9
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

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