doc/ja_JP.eucJP/man/man3/setproctitle.3
Kazuo Horikawa cb5d1a9147 Replace jpman project specific RCS keyword with $FreeBSD.
jpman project specific RCS keyword (jpman %Id) is obsolete,
after manual entries are stored in freefall CVS repository.
This old Id is useless and more worse it confuses users and bug reporters.
So, this old Id is removed.

Submitted by:jpman project <man-jp@jp.FreeBSD.org>
2001-05-14 01:10:24 +00:00

104 lines
2.8 KiB
Groff

.\" Copyright (c) 1995 Peter Wemm <peter@freebsd.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, is permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice immediately at the beginning of the file, without modification,
.\" this list of conditions, and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. This work was done expressly for inclusion into FreeBSD. Other use
.\" is permitted provided this notation is included.
.\" 4. Absolutely no warranty of function or purpose is made by the author
.\" Peter Wemm.
.\" 5. Modifications may be freely made to this file providing the above
.\" conditions are met.
.\"
.\" %Id: setproctitle.3,v 1.10 1998/03/19 07:34:19 charnier Exp %
.\"
.\" The following requests are required for all man pages.
.\" $FreeBSD$
.Dd December 16, 1995
.Os FreeBSD
.Dt SETPROCTITLE 3
.Sh 名称
.Nm setproctitle
.Nd
.Xr ps 1
用のプロセスタイトルを設定する
.Sh 書式
.Fd #include <sys/types.h>
.Fd #include <libutil.h>
.Ft void
.Fn setproctitle "const char *fmt" "..."
.Pp
Link with
.Va -lutil
on the
.Xr cc 1
command line.
.Sh 解説
.Fn setproctitle
ライブラリルーチンは、
.Xr ps 1
コマンドに現れるプロセスタイトル
を設定します。
.Pp
タイトルは実行可能モジュールの名前に、
.Va fmt
で指定される引数の
.Xr printf 3
スタイルの拡張の結果が続いたもので設定されます。
.Pp
.Va fmt
が NULL の場合、プロセスタイトルは実行可能モジュールの名前にリセット
されるだけです。
.Sh
デーモンにタイトルを設定してそのアクティビティを示す方法は次のとおりです。
.Bd -literal -offset indent
setproctitle("talking to %s", inet_ntoa(addr));
.Ed
.Sh 関連項目
.Xr ps 1 ,
.Xr w 1 ,
.Xr kvm 3 ,
.Xr kvm_getargv 3 ,
.Xr printf 3
.Sh 規格
.Fn setproctitle
は、黙示的には標準ではありません。
.Xr ps 1
コマンド行が変化するようにする他の方法
(argv[0] ストリング上のコピーを含む)も黙示的に
移植不可能です。システム付属の
.Fn setproctitle
が存在する場合は、これを使用する方が賢明です。
.Pp
不都合なことに、
.Fn setproctitle
の他のバージョンを呼び出す他の規約がある
可能性があります。ただし、作者はまだどれも見つけていません。これは主導的な
慣行であると信じられています。
.Pp
実現は、
.Tn NetBSD
.Tn BSD/OS
も含めて、実現システムは他のシステムとの
互換性があると考えられます。
.Sh 歴史
.Fn setproctitle
.Fx 2.2
で最初に現れました。
他のオペレーティングシステムも同じような機能を持っています。
.Sh 作者
.An Peter Wemm Aq peter@FreeBSD.org
は、
.An Eric Allman Aq eric@sendmail.org
による
.Sy "Sendmail 8.7.3"
ソースコードからアイデアを取りました。