Seth Woolley's Man Viewer

setproctitle(3) - setproctitle - set process title - man 3 setproctitle

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

SETPROCTITLE(3)          BSD Library Functions Manual          SETPROCTITLE(3)

NAME
     setproctitle -- set(7,n,1 builtins) process title

SYNOPSIS
     #include <stdlib.h>

     void
     setproctitle(const char *fmt, ...);

DESCRIPTION
     The setproctitle() function sets the invoking process's title.  The
     process title is set(7,n,1 builtins) to the last component of the program name, followed
     by a colon and the formatted string(3,n) specified by fmt.  If fmt is NULL,
     the colon and formatted string(3,n) are omitted.  The length of a process
     title is limited to 2048 bytes.

EXAMPLES
     Set the process title to the program name, with no further information:

           setproctitle(NULL);

     Set the process title to the program name, an informational string(3,n), and
     the process id:

           setproctitle("foo! (%d)", getpid());

SEE ALSO
     ps(1), w(1), printf(1,3,1 builtins)(3)

HISTORY
     The setproctitle() function first appeared in(1,8) NetBSD 0.9a.

Linux NetKit (0.17)             April 13, 1994             Linux NetKit (0.17)

References for this manual (incoming links)