:man| Alphabetical   Categories   About us 
 
SETPROCTITLE (3) | C library functions | Unix Manual Pages | :man

NAME

setproctitle - set process title

CONTENTS

Synopsis
Description
Examples
See Also
Standards
History
Authors
Bugs

SYNOPSIS


.In sys/types.h
.In unistd.h void setproctitle "const char *fmt" "..."

DESCRIPTION

The setproctitle library routine sets the process title that appears on the ps(1) command.

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));

SEE ALSO

ps(1), w(1), kvm(3), kvm_getargv(3), printf(3)

STANDARDS

ps(1)

HISTORY

AUTHORS

BUGS

 
Created by Blin Media, 2008-2013