pub fn set_daemon_process_name()Expand description
Rename the running process so process managers can distinguish the gateway
daemon from interactive term-session clients. Best-effort and cosmetic:
a failure is ignored and never affects functionality.
Platform behavior (and limitations):
- Linux:
PR_SET_NAMEsets the process comm (capped at 15 bytes →term-session-d), sops -comm,top, andhtopshow the renamed value. This is the most complete rename on any platform. - macOS:
pthread_setname_npsets the thread name, not the process comm —ps -o command Activity Monitor’s process list still showterm-session. The renamed value is only visible in Activity Monitor’s per-thread view (andsample). This is an OS limitation: macOS has no portable user-space API to rename the process comm. Daemon disambiguation on macOS therefore relies primarily on the--daemonargv flag and theGateway Daemon PIDheader printed byterm-session list. - Windows:
SetThreadDescriptionsets the thread description, which Process Explorer / Process Hacker show in the Description column.