The setproctitle() library routine sets the process title that appears on the ps(1) command. The setproctitle_fast() variant is optimized for high frequency updates, but may make the ps(1) command slightly slower by not updating the kernel cache of the program arguments.
The title is set from the executable's name, followed by the result of a printf(3) style expansion of the arguments as specified by the fmt argument. If the fmt argument begins with a “-” character, the executable's name is skipped.
If fmt is NULL, the process title is restored.
Examples
To set the title on a daemon to indicate its activity:
setproctitle("talking to %s", inet_ntoa(addr));
Releases
21 releases since FreeBSD 11.3-RELEASE; the text changed 10 times.