void my_pthread_exit(void *status) { NXThreadId_t tid = NXThreadGetId(); NXContext_t ctx; char name[PATH_MAX] = ""; NXThreadGetContext(tid, &ctx); NXContextGetName(ctx, name, PATH_MAX); /* "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread" with a debug build of LibC the reaper can have different names */ if (!strindex(name, "\'s")) { pthread_exit(status); } }
void my_pthread_exit(void *status) { NXThreadId_t tid; NXContext_t ctx; char name[NX_MAX_OBJECT_NAME_LEN+1] = ""; tid= NXThreadGetId(); if (tid == NX_INVALID_THREAD_ID || !tid) return; if (NXThreadGetContext(tid, &ctx) || NXContextGetName(ctx, name, sizeof(name)-1)) return; /* "MYSQLD.NLM's LibC Reaper" or "MYSQLD.NLM's main thread" with a debug build of LibC the reaper can have different names */ if (!strindex(name, "\'s")) pthread_exit(status); }