Skip to content

Commit d7aacbe

Browse files
RafaelGSSnodejs-github-bot
authored andcommitted
src: set signal inspector io thread name
PR-URL: nodejs#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 5669cb0 commit d7aacbe

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
@@ -1237,7 +1237,9 @@ changes:
12371237
* Maximum sizes:
12381238
* Windows: 32,767 characters
12391239
* macOS: 64 characters
1240-
* Other systems: 16 characters
1240+
* Linux: 16 characters
1241+
* NetBSD: limited to `PTHREAD_MAX_NAMELEN_NP`
1242+
* FreeBSD and OpenBSD: limited to `MAXCOMLEN`
12411243
**Default:** `'WorkerThread'`.
12421244

12431245
### 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)