| 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.
| “ | This philosophy, in the hands of amateurs, leads to inexplicably mind-numbing botches like the existence of two programs, “head” and “tail,” which print the first part or the last part of a file, depending. Even though their operations are duals of one another, “head” and “tail” are different programs, written by different authors, and take different options! | ” |
| — The Unix Haters' handbook | ||