1 .\" Copyright (c) 1995 Peter Wemm <peter@freebsd.org>
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, is permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice immediately at the beginning of the file, without modification,
9 .\" this list of conditions, and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. This work was done expressly for inclusion into FreeBSD. Other use
14 .\" is permitted provided this notation is included.
15 .\" 4. Absolutely no warranty of function or purpose is made by the author
17 .\" 5. Modifications may be freely made to this file providing the above
18 .\" conditions are met.
20 .\" $FreeBSD: src/lib/libc/gen/setproctitle.3,v 1.16.2.4 2001/12/14 18:33:51 ru Exp $
21 .\" $DragonFly: src/lib/libc/gen/setproctitle.3,v 1.3 2007/08/18 20:48:47 swildner Exp $
23 .\" The following requests are required for all man pages.
29 .Nd set the process title for
37 .Fn setproctitle "const char *fmt" "..."
41 library routine sets the process title that appears on the
45 The title is set from the executable's name, followed by the
48 style expansion of the arguments as specified by the
53 argument begins with a
55 character, the executable's name is skipped.
59 is NULL, the process title is restored.
61 To set the title on a daemon to indicate its activity:
62 .Bd -literal -offset indent
63 setproctitle("talking to %s", inet_ntoa(addr));
73 is implicitly non-standard. Other methods of causing the
75 command line to change, including copying over the argv[0] string are
76 also implicitly non-portable. It is preferable to use an operating system
81 Unfortunately, it is possible that there are other calling conventions
84 although none have been found by the author as yet. This is believed to be
85 the predominant convention.
87 It is thought that the implementation is compatible with other systems,
96 Other operating systems have
100 .An Peter Wemm Aq peter@FreeBSD.org
101 stole the idea from the
104 .An Eric Allman Aq eric@sendmail.org .