mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-05 00:55:24 +00:00
[master] give threads unique names to assist debugging
4602. [func] Threads are now set to human-readable names to assist debugging, when supported by the OS. [RT #43234]
This commit is contained in:
@@ -1449,6 +1449,10 @@ isc__taskmgr_create(isc_mem_t *mctx, unsigned int workers,
|
||||
if (isc_thread_create(run, manager,
|
||||
&manager->threads[manager->workers]) ==
|
||||
ISC_R_SUCCESS) {
|
||||
char name[16]; /* thread name limit on Linux */
|
||||
snprintf(name, sizeof(name), "isc-worker%04d", i);
|
||||
isc_thread_setname(manager->threads[manager->workers],
|
||||
name);
|
||||
manager->workers++;
|
||||
started++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user