Main index | Section 3 | 日本語 | Options |
#include <sys/types.h>
#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 13, 2020 |
Main index | Section 3 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Today, the Unix equivalent of a power drill would have 20 dials and switches, come with a nonstandard plug, require the user to hand-wind the motor coil, and not accept 3/8" or 7/8" drill bits (though this would be documented in the BUGS section of its instruction manual). | ” |
— The Unix Haters' handbook |