|
if (size <= process_title.len) { |
|
uv_mutex_unlock(&process_title_mutex); |
|
return UV_ENOBUFS; |
|
} |
The check is wrong because
process_title.len is the maximum capacity of the process title, not its current length.
Proper check: size <= strlen(process_title.str) except we probably don't want to call strlen() every time.
I'll open a PR with a fix.
Refs: nodejs/node#31633
libuv/src/unix/proctitle.c
Lines 113 to 116 in 9f1a052
The check is wrong because
process_title.lenis the maximum capacity of the process title, not its current length.Proper check:
size <= strlen(process_title.str)except we probably don't want to callstrlen()every time.I'll open a PR with a fix.
Refs: nodejs/node#31633