Skip to content

Commit 915d7ae

Browse files
RafaelGSStargos
authored andcommitted
src: set signal inspector io thread name
PR-URL: #56416 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Juan José Arboleda <[email protected]>
1 parent f4b086d commit 915d7ae

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

doc/api/worker_threads.md

+3-1
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'`

src/inspector_agent.cc

+1
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);

src/inspector_io.cc

+1-1
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;

0 commit comments

Comments
 (0)