Main index | Section 3 | Options |
#include <unistd.h>
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.
setproctitle("talking to %s", inet_ntoa(addr));
Unfortunately, it is possible that there are other calling conventions to other versions of setproctitle(), although none have been found by the author as yet. This is believed to be the predominant convention.
It is thought that the implementation is compatible with other systems,
including
NetBSD
and
.Bsx .
Always use the proper secure idiom:
setproctitle("%s", string);
SETPROCTITLE (3) | November 28, 2022 |
Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Never write it in C if you can do it in `awk'; Never do it in `awk' if `sed' can handle it; Never use `sed' when `tr' can do the job; Never invoke `tr' when `cat' is sufficient; Avoid using `cat' whenever possible. |
” |
— Taylor's Laws of Programming |