aboutsummaryrefslogtreecommitdiff
path: root/scripts/__init__.py
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-03-27 22:43:29 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-03-27 22:43:29 +0300
commit9aa50f04a9d5724cda773d609cf9a9154a01f256 (patch)
tree90e024492f66cdfd176bd6072665708395d0eb79 /scripts/__init__.py
parenta57b97285c3308fbdcc167ab3da9ae1dd78767b6 (diff)
fix: use KERN_PROCARGS2 for macOS process name resolution
proc_name() fails on macOS Sequoia due to undersized buffer (MAXCOMLEN+1 = 17 bytes). Even with a larger buffer, it returns the kernel comm name ('node') rather than the effective process title ('pi') set via Node.js process.title. Replace with sysctl(KERN_PROCARGS2) which reads argv[0] and reflects runtime title changes, matching what ps(1) displays. Falls back to pbi_comm from proc_pidinfo if sysctl fails.
Diffstat (limited to 'scripts/__init__.py')
0 files changed, 0 insertions, 0 deletions