5 ms·
There's the `setproctitle` in FreeBSD that is designed exactly for a process to update the information that is presented to tools such as ps. https://man.freeb
by ArchOversight 2y ago
There's the `setproctitle` in FreeBSD that is designed exactly for a process to update the information that is presented to tools such as ps.
https://man.freebsd.org/cgi/man.cgi?query=setproctitle&apropos=0&sektion=3&manpath=FreeBSD+14.1-RELEASE+and+Ports&arch=default&format=html https://man.freebsd.org/cgi/man.cgi?query=setproctitle&aprop...
- account42 2y agoprctl(PR_SET_NAME) on Linux - sets the thread name, and the name of the main thread is shown as the process name in most tools.
- asveikau 2y agoThere's also getprogname(3) on a lot of systems, and the __progname variable. I seem to recall this is an area where various Unix like systems have slight variations.