OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / netkit / draft / man3 / setproctitle.3
1 .\"     OpenBSD: setproctitle.3,v 1.4 1996/10/08 01:20:08 michaels Exp 
2 .\"     $Id: setproctitle.3,v 1.2 2000/12/14 09:58:54 ysato Exp $
3 .\"
4 .\" Copyright (c) 1994, 1995 Christopher G. Demetriou
5 .\" All rights reserved.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. All advertising materials mentioning features or use of this software
16 .\"    must display the following acknowledgement:
17 .\"      This product includes software developed by Christopher G. Demetriou
18 .\"      for the NetBSD Project.
19 .\" 3. The name of the author may not be used to endorse or promote products
20 .\"    derived from this software without specific prior written permission
21 .\"
22 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 .\"
33 .\" Japanese Version Copyright (c) 2000 Yuichi SATO
34 .\"         all rights reserved.
35 .\" Translated Thu Dec 14 18:22:51 JST 2000
36 .\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
37 .\"
38 .Dd April 13, 1994
39 .Dt SETPROCTITLE 3
40 .Os "Linux NetKit (0.17)"
41 .\"O .Sh NAME
42 .Sh Ì¾Á°
43 .Nm setproctitle
44 .\"O .Nd set process title
45 .Nd ¥×¥í¥»¥¹¤Î¥¿¥¤¥È¥ë¤òÀßÄꤹ¤ë
46 .\"O .Sh SYNOPSIS
47 .Sh ½ñ¼°
48 .Fd #include <stdlib.h>
49 .Ft void
50 .Fn setproctitle "const char *fmt" "..."
51 .\"O .Sh DESCRIPTION
52 .\"O The
53 .\"O .Fn setproctitle
54 .\"O function sets the invoking process's title.
55 .\"O The process title is set to the last component of the program
56 .\"O name, followed by a colon and the formatted string specified
57 .\"O by
58 .\"O .Va fmt .
59 .\"O If
60 .\"O .Va fmt
61 .\"O is NULL, the colon and formatted string are omitted.
62 .\"O The length of a process title is limited to 2048 bytes.
63 .Sh ÀâÌÀ
64 .Fn setproctitle
65 ¤Ï¡¢µ¯Æ°¤·¤Æ¤¤¤ë¥×¥í¥»¥¹¤Î¥¿¥¤¥È¥ë¤òÀßÄꤹ¤ë¡£
66 ¥×¥í¥»¥¹¤Î¥¿¥¤¥È¥ë¤Ï¡¢¥×¥í¥°¥é¥à̾¤«¤é¥Ç¥£¥ì¥¯¥È¥êÉôʬ¤ò¼è¤êµî¤Ã¤¿Ì¾Á°¤Ë¡¢
67 ¥³¥í¥ó¤ò¶´¤ó¤Ç
68 .Va fmt
69 ¤Ë»ØÄꤵ¤ì¤¿½ñ¼°ÉÕ¤­Ê¸»úÎó¤ò³¤±¤¿¤â¤Î¤Ë¤Ê¤ë¡£
70 .Va fmt
71 ¤¬ NULL ¤Î¾ì¹ç¡¢¥³¥í¥ó¤È¥Õ¥©¡¼¥Þ¥Ã¥È¤µ¤ì¤¿Ê¸»úÎó¤Ï¾Êά¤µ¤ì¤ë¡£
72 ¥×¥í¥»¥¹¤Î¥¿¥¤¥È¥ë¤ÎŤµ¤Ï¡¢2048 ¥Ð¥¤¥È¤Þ¤Ç¤ËÀ©¸Â¤µ¤ì¤Æ¤¤¤ë¡£
73 .\"O .Sh EXAMPLES
74 .Sh Îã
75 .\"O Set the process title to the program name, with no further information:
76 ¥×¥í¥»¥¹¤Î¥¿¥¤¥È¥ë¤ò¡¢Â¾¤Î¾ðÊó¤ò´Þ¤Þ¤Ê¤¤¡¢¥×¥í¥°¥é¥à̾¤Î¤ß¤ËÀßÄꤹ¤ë:
77 .Bd -literal -offset indent
78 setproctitle(NULL);
79 .Ed
80 .Pp
81 .\"O Set the process title to the program name, an informational string,
82 .\"O and the process id:
83 ¥×¥í¥»¥¹¤Î¥¿¥¤¥È¥ë¤ò¡¢¥×¥í¥°¥é¥à̾¡¦¾ðÊ󤬽ñ¤«¤ì¤¿Ê¸»úÎó¡¦
84 ¥×¥í¥»¥¹ ID ¤ò³¤±¤¿¤â¤Î¤ËÀßÄꤹ¤ë:
85 .Bd -literal -offset indent
86 setproctitle("foo! (%d)", getpid());
87 .Ed
88 .\"O .Sh SEE ALSO
89 .Sh ´ØÏ¢¹àÌÜ
90 .Xr ps 1 ,
91 .Xr w 1 ,
92 .Xr printf 3
93 .\"O .Sh HISTORY
94 .Sh ÍúÎò
95 .\"O The
96 .\"O .Fn setproctitle
97 .\"O function first appeared in NetBSD 0.9a.
98 .Fn setproctitle
99 ¤Ï NetBSD 0.9a ¤Ç½é¤á¤ÆÅо줷¤¿¡£