mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 11:59:00 +00:00
On Linux, process.title should modify the process name visible in tools like `ps`, `top`, and `htop`. Previously, setting process.title only updated an internal variable but did not modify the actual process title that external tools see. This fix implements process.title properly on Linux by: 1. Storing the original argv buffer location during initialization 2. Overwriting the original argv memory when process.title is set (this is how /proc/self/cmdline is populated) 3. Using prctl(PR_SET_NAME) to set the thread name (shown in top/htop) This matches Node.js behavior, which uses libuv's implementation that does the same argv memory overwriting technique. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>