◐ Shell
clean mode source ↗

src: set signal inspector io thread name · nodejs/node@915d7ae

Original file line numberDiff line numberDiff line change

@@ -1235,7 +1235,9 @@ changes:

12351235

* Maximum sizes:

12361236

* Windows: 32,767 characters

12371237

* macOS: 64 characters

1238-

* Other systems: 16 characters

1238+

* Linux: 16 characters

1239+

* NetBSD: limited to `PTHREAD_MAX_NAMELEN_NP`

1240+

* FreeBSD and OpenBSD: limited to `MAXCOMLEN`

12391241

**Default:** `'WorkerThread'`.

12401242
12411243

### Event: `'error'`

Original file line numberDiff line numberDiff line change

@@ -86,6 +86,7 @@ static void StartIoThreadWakeup(int signo, siginfo_t* info, void* ucontext) {

8686

}

8787
8888

inline void* StartIoThreadMain(void* unused) {

89+

uv_thread_setname("SignalInspector");

8990

for (;;) {

9091

uv_sem_wait(&start_io_thread_semaphore);

9192

Mutex::ScopedLock lock(start_io_thread_async_mutex);

Original file line numberDiff line numberDiff line change

@@ -286,7 +286,7 @@ void InspectorIo::ThreadMain() {

286286

int thread_name_error = uv_thread_setname("InspectorIo");

287287

if (!thread_name_error) [[unlikely]] {

288288

per_process::Debug(node::DebugCategory::INSPECTOR_SERVER,

289-

"Failed to set thread name for Inspector\n");

289+

"Failed to set thread name for Inspector\n");

290290

}

291291

uv_loop_t loop;

292292

loop.data = nullptr;